This repository was archived by the owner on Nov 2, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor #282 Enhancement: Use GithubActions instead of Travis for tests…
… (OskarStark) This PR was merged into the 2.0-dev branch. Discussion ---------- Enhancement: Use GithubActions instead of Travis for tests Commits ------- 83800e1 Enhancement: Use GithubActions instead of Travis for tests
- Loading branch information
Showing
2 changed files
with
70 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: "CI" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
env: | ||
fail-fast: true | ||
|
||
jobs: | ||
test: | ||
name: "PHP ${{ matrix.php-version }} + DEPS=${{ matrix.deps }}" | ||
|
||
runs-on: ubuntu-latest | ||
|
||
continue-on-error: ${{ matrix.allow-failures }} | ||
|
||
strategy: | ||
matrix: | ||
php-version: | ||
- '7.1.3' | ||
- '7.2' | ||
deps: [no] | ||
allow-failures: [false] | ||
include: | ||
- php-version: '7.1.3' | ||
deps: 'low' | ||
allow-failures: false | ||
|
||
steps: | ||
- name: "Checkout code" | ||
uses: actions/[email protected] | ||
|
||
- name: "Install PHP with extensions" | ||
uses: shivammathur/[email protected] | ||
with: | ||
coverage: "none" | ||
php-version: ${{ matrix.php-version }} | ||
tools: composer:v2 | ||
|
||
- name: "Add PHPUnit matcher" | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
|
||
- name: "Set composer cache directory" | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: "Cache composer" | ||
uses: actions/[email protected] | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('composer.json') }}-deps-${{ matrix.deps }}-allow-failures-${{ matrix.allow-failures }} | ||
restore-keys: ${{ runner.os }}-${{ matrix.php-version }}-composer- | ||
|
||
- if: matrix.deps == 'low' | ||
run: composer --prefer-lowest --prefer-stable update | ||
|
||
- if: matrix.deps = 'no' | ||
run: composer update | ||
|
||
- name: "Install PHPUnit" | ||
run: vendor/bin/simple-phpunit install | ||
|
||
- name: "PHPUnit version" | ||
run: vendor/bin/simple-phpunit --version | ||
|
||
- name: "Run tests" | ||
run: vendor/bin/simple-phpunit |
This file was deleted.
Oops, something went wrong.