-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from unleashedtech/switch-ci
Switch from Travis CI to Github Actions
- Loading branch information
Showing
5 changed files
with
121 additions
and
60 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
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,116 @@ | ||
name: "Test" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "master" | ||
schedule: | ||
- cron: "0 8 * * *" | ||
|
||
jobs: | ||
phpcs: | ||
name: PHPCS | ||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.2 | ||
extensions: curl | ||
coverage: none | ||
tools: composer:v2, cs2pr | ||
|
||
- run: composer update --no-interaction --no-progress | ||
|
||
- run: vendor/bin/phpcs -q --report=checkstyle | cs2pr | ||
|
||
validate-against-schema: | ||
name: Validate against schema | ||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.1 | ||
extensions: curl | ||
coverage: none | ||
tools: composer:v2 | ||
|
||
- run: composer update --no-interaction --no-progress | ||
|
||
- name: Build Docker image | ||
uses: ./.github/workflows/validate-against-schema | ||
|
||
- name: Lint XML configuration files | ||
uses: ./.github/workflows/validate-against-schema | ||
with: | ||
args: xmllint --noout --schema vendor/squizlabs/php_codesniffer/phpcs.xsd src/Unleashed/ruleset.xml | ||
|
||
phpunit: | ||
name: PHPUnit | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
matrix: | ||
php-version: ['7.1', '7.2', '7.3', '7.4'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
extensions: curl | ||
coverage: none | ||
|
||
- run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
|
||
- run: composer update --no-interaction --no-progress | ||
|
||
- run: ./vendor/bin/simple-phpunit | ||
|
||
test-report: | ||
name: Test report | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
matrix: | ||
php-version: ['7.1', '7.2', '7.3', '7.4'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
extensions: curl | ||
coverage: none | ||
|
||
- run: composer update --no-interaction --no-progress | ||
|
||
- name: Test reports | ||
run: make test-report | ||
|
||
test-fixes: | ||
name: Test fixes | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
matrix: | ||
php-version: ['7.1', '7.2', '7.3', '7.4'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
extensions: curl | ||
coverage: none | ||
|
||
- run: composer update --no-interaction --no-progress | ||
|
||
- name: Test fixes | ||
run: make test-fix |
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,3 @@ | ||
FROM alpine:3.11.3 | ||
|
||
RUN apk add --no-cache libxml2-utils |
This file was deleted.
Oops, something went wrong.
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