Improve tooling, checks and workflows #206
Workflow file for this run
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
name: Lint, test and analyse | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
install_dependencies: | |
runs-on: ubuntu-latest | |
name: Install dependencies | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: docker compose run --rm builder composer install | |
- name: Cache installed dependencies | |
id: cache-composer-dependencies | |
uses: actions/cache/save@v4 | |
with: | |
path: | | |
./vendor/ | |
./composer.lock | |
key: ${{ runner.os }}-build-composer-dependencies-${{ github.sha }} | |
linting: | |
needs: install_dependencies | |
runs-on: ubuntu-latest | |
name: Linting | |
steps: | |
- uses: actions/cache/restore@v4 | |
name: Restore cached dependencies | |
with: | |
path: | | |
./vendor/ | |
./composer.lock | |
key: ${{ runner.os }}-build-composer-dependencies-${{ github.sha }} | |
- uses: actions/checkout@v4 | |
- name: Run linting | |
run: docker compose run --rm builder composer test:lint | |
testing: | |
needs: install_dependencies | |
runs-on: ubuntu-latest | |
name: Testing | |
steps: | |
- uses: actions/cache/restore@v4 | |
name: Restore cached dependencies | |
with: | |
path: | | |
./vendor/ | |
./composer.lock | |
key: ${{ runner.os }}-build-composer-dependencies-${{ github.sha }} | |
- uses: actions/checkout@v4 | |
- name: Run testing | |
run: docker compose run --rm builder composer test:phpunit | |
analysis: | |
needs: install_dependencies | |
runs-on: ubuntu-latest | |
name: Analysis | |
steps: | |
- uses: actions/cache/restore@v4 | |
name: Restore cached dependencies | |
with: | |
path: | | |
./vendor/ | |
./composer.lock | |
key: ${{ runner.os }}-build-composer-dependencies-${{ github.sha }} | |
- uses: actions/checkout@v4 | |
- name: Run analysis | |
run: docker compose run --rm builder composer test:phpstan |