Use GitHub actions to test code (#58) #3
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: Test | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
test-and-code-style: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: [8.1] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: composer install --prefer-dist | |
- name: Run tests | |
run: vendor/bin/phpunit --bootstrap __tests__/bootstrap.php __tests__ | |
- name: Run PHPCS | |
run: vendor/bin/phpcs --standard=WordPress --extensions=php --ignore=vendor/ . |