Skip to content

Commit

Permalink
[CI] Moved to Github Actions (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnocon authored Apr 12, 2022
1 parent 32b02a8 commit 6b59098
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 30 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: CI

on:
push:
branches:
- main
- '[0-9]+.[0-9]+'
pull_request: ~

jobs:
cs-fix:
name: Run code style check
runs-on: "ubuntu-20.04"
strategy:
matrix:
php:
- '7.3'
steps:
- uses: actions/checkout@v2

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: 'pdo_sqlite, gd'
tools: cs2pr

- uses: "ramsey/composer-install@v1"
with:
dependency-versions: "highest"

- name: Run code style check
run: composer run-script check-cs -- --format=checkstyle | cs2pr

tests:
name: Unit tests
runs-on: "ubuntu-20.04"
timeout-minutes: 15

strategy:
fail-fast: false
matrix:
php:
- '7.1'
- '7.2'
- '7.3'

steps:
- uses: actions/checkout@v2

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: pdo_sqlite, gd
tools: cs2pr

- uses: "ramsey/composer-install@v1"
with:
dependency-versions: "highest"
composer-options: "${{ matrix.composer_options }}"

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Run unit test suite
run: composer test
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
}
},
"scripts": {
"fix-cs": "@php ./vendor/bin/php-cs-fixer fix -v --show-progress=estimating"
"fix-cs": "php-cs-fixer fix -v --show-progress=estimating",
"check-cs": "@fix-cs --dry-run",
"test": "phpspec run --format=pretty"
}
}

0 comments on commit 6b59098

Please sign in to comment.