chore(ci): token var name #56
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: CI | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: {} | |
push: | |
branches: | |
- main | |
- develop | |
- feature/* | |
pull_request: | |
branches: | |
- main | |
- develop | |
- feature/* | |
permissions: | |
contents: write | |
jobs: | |
tests: | |
name: Tests π§ͺ | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ποΈ | |
uses: actions/checkout@v4 | |
- name: Set up PHP π | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
coverage: xdebug | |
extensions: zip | |
- name: Install dependencies π¦ | |
run: composer install --prefer-dist --no-progress --no-suggest | |
- name: Run PHPUnit tests π§ͺ | |
uses: php-actions/phpunit@v3 | |
env: | |
XDEBUG_MODE: coverage | |
with: | |
bootstrap: vendor/autoload.php | |
configuration: phpunit.xml | |
php_extensions: xdebug zip | |
args: tests --coverage-clover ./coverage.xml | |
- name: Upload to Codecov π | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.xml | |
verbose: true | |
documentation: | |
name: Documentation π | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ποΈ | |
uses: actions/checkout@v3 | |
- name: Generate documentation π | |
# create documentation folder if not exists then run phpdoc | |
run: docker run --rm -v ${{ github.workspace }}:/data phpdoc/phpdoc:latest run -d src -t docs | |
- name: Deploy documentation π | |
uses: JamesIves/[email protected] | |
with: | |
branch: documentation | |
folder: docs |