Skip to content
This repository was archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
minor #282 Enhancement: Use GithubActions instead of Travis for tests…
Browse files Browse the repository at this point in the history
… (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
fabpot committed Oct 29, 2020
2 parents db4a7e6 + 83800e1 commit 0e1dfb0
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 28 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
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
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

0 comments on commit 0e1dfb0

Please sign in to comment.