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 #44 from WyriHaximus/sync-makefile
Sync Makefile improvements from wyrihaximus/test-utilities
- Loading branch information
Showing
2 changed files
with
97 additions
and
66 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 |
---|---|---|
@@ -1,58 +1,81 @@ | ||
name: Continuous Integration | ||
on: | ||
push: | ||
pull_request: | ||
push: | ||
pull_request: | ||
jobs: | ||
composer-install: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [7.4] | ||
composer: [lowest, current, highest] | ||
runs-on: ubuntu-latest | ||
container: | ||
image: wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.11-dev-root | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Cache composer packages | ||
uses: actions/cache@v1 | ||
with: | ||
path: ./vendor/ | ||
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} | ||
- name: Install Dependencies | ||
run: composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o | ||
if: matrix.composer == 'lowest' | ||
- name: Install Dependencies | ||
run: composer install --ansi --no-progress --no-interaction --prefer-dist -o | ||
if: matrix.composer == 'current' | ||
- name: Install Dependencies | ||
run: composer update --ansi --no-progress --no-interaction --prefer-dist -o | ||
if: matrix.composer == 'highest' | ||
qa: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [7.4] | ||
composer: [lowest, current, highest] | ||
qa: [lint, cs, stan, psalm, unit-ci, infection, composer-require-checker, composer-unused, backward-compatibility-check] | ||
needs: composer-install | ||
runs-on: ubuntu-latest | ||
container: | ||
image: wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.11-dev-root | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Cache composer packages | ||
uses: actions/cache@v1 | ||
with: | ||
path: ./vendor/ | ||
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} | ||
- name: Install Dependencies | ||
run: (test -f vendor && true ) || composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o | ||
if: matrix.composer == 'lowest' | ||
- name: Install Dependencies | ||
run: (test -f vendor && true ) || composer install --ansi --no-progress --no-interaction --prefer-dist -o | ||
if: matrix.composer == 'current' | ||
- name: Install Dependencies | ||
run: (test -f vendor && true ) || composer update --ansi --no-progress --no-interaction --prefer-dist -o | ||
if: matrix.composer == 'highest' | ||
- run: make ${{ matrix.qa }} | ||
generate-checks-strategy: | ||
name: Generate Checks | ||
runs-on: ubuntu-latest | ||
outputs: | ||
check: ${{ steps.generate-checks-strategy.outputs.check }} | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- id: generate-checks-strategy | ||
name: Generate check | ||
run: | | ||
printf "Checks found: %s\r\n" $(make task-list-ci) | ||
printf "::set-output name=check::%s" $(make task-list-ci) | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Lint Code Base | ||
uses: docker://github/super-linter:v2.2.0 | ||
composer-install: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [7.4] | ||
composer: [lowest, current, highest] | ||
needs: lint | ||
runs-on: ubuntu-latest | ||
container: | ||
image: wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.12-dev-root | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Cache composer packages | ||
uses: actions/cache@v1 | ||
with: | ||
path: ./vendor/ | ||
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} | ||
- name: Install Dependencies | ||
run: composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o | ||
if: matrix.composer == 'lowest' | ||
- name: Install Dependencies | ||
run: composer install --ansi --no-progress --no-interaction --prefer-dist -o | ||
if: matrix.composer == 'current' | ||
- name: Install Dependencies | ||
run: composer update --ansi --no-progress --no-interaction --prefer-dist -o | ||
if: matrix.composer == 'highest' | ||
qa: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [7.4] | ||
composer: [lowest, current, highest] | ||
check: ${{ fromJson(needs.generate-checks-strategy.outputs.check) }} | ||
needs: | ||
- composer-install | ||
- generate-checks-strategy | ||
runs-on: ubuntu-latest | ||
container: | ||
image: wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.12-dev-root | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Cache composer packages | ||
uses: actions/cache@v1 | ||
with: | ||
path: ./vendor/ | ||
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }} | ||
- name: Install Dependencies | ||
run: (test -f vendor && true ) || composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o | ||
if: matrix.composer == 'lowest' | ||
- name: Install Dependencies | ||
run: (test -f vendor && true ) || composer install --ansi --no-progress --no-interaction --prefer-dist -o | ||
if: matrix.composer == 'current' | ||
- name: Install Dependencies | ||
run: (test -f vendor && true ) || composer update --ansi --no-progress --no-interaction --prefer-dist -o | ||
if: matrix.composer == 'highest' | ||
- name: Fetch Tags | ||
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
if: matrix.check == 'backward-compatibility-check' | ||
- run: make ${{ matrix.check }} |
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