Skip to content

Commit

Permalink
Merge 3a2ecd5 into c829729
Browse files Browse the repository at this point in the history
  • Loading branch information
MortalFlesh committed Apr 6, 2021
2 parents c829729 + 3a2ecd5 commit 96bef11
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Tests and linting

on:
push:
pull_request:
schedule:
- cron: '0 3 * * *'

jobs:
unit-tests:
runs-on: ubuntu-latest

strategy:
matrix:
php-version: ['7.3']
dependencies: ['']
include:
- { php-version: '7.3', dependencies: '--prefer-lowest --prefer-stable' }

name: Unit tests - PHP ${{ matrix.dependencies }}

steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, intl, zip
coverage: xdebug
tools: composer:v2

- name: Install dependencies
run: composer update --no-interaction ${{ matrix.dependencies }}

- name: Run tests
env:
COLUMNS: 120
run: |
composer tests-ci
- name: Submit coverage to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: ${{ github.job }}-PHP-${{ matrix.php-version }} ${{ matrix.dependencies }}
run: |
composer global require php-coveralls/php-coveralls
~/.composer/vendor/bin/php-coveralls --coverage_clover=./reports/clover.xml --json_path=./reports/coveralls-upload.json -v
finish-tests:
name: Tests finished
needs: [unit-tests]
runs-on: ubuntu-latest
steps:
- name: Notify Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true

codestyle:
name: "Code style and static analysis"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
extensions: mbstring, intl
tools: composer:v2

- name: Install dependencies
run: composer update --no-progress

- name: Run checks
run: composer analyze

0 comments on commit 96bef11

Please sign in to comment.