CI: pin GitHub Actions runners #583
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: Exercise linting with PHPCS for PSR 12 | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- master | |
pull_request: | |
jobs: | |
test: | |
name: PHP ${{ matrix.php-version }} - ${{ matrix.os }} - ${{ github.event_name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: [8.0, 8.1, 8.2] | |
os: [ubuntu-22.04, windows-2022, macOS-latest] | |
steps: | |
- name: Set git line endings | |
if: ${{ matrix.os == 'windows-2022' }} | |
run: | | |
git config --system core.autocrlf false | |
git config --system core.eol lf | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- uses: shivammathur/setup-php@a36e1e52ff4a1c9e9c9be31551ee4712a6cb6bd0 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: gmp | |
tools: composer | |
- name: Install dependencies | |
shell: bash | |
run: | | |
curl -Lo bin/phpcs.phar https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar | |
chmod +x bin/phpcs.phar | |
- name: Install composer packages | |
run: composer install | |
- name: Lint exercises | |
shell: bash | |
run: composer lint:check |