Skip to content

ci: make release workflow idempotent for existing releases #9

ci: make release workflow idempotent for existing releases

ci: make release workflow idempotent for existing releases #9

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
unit:
name: Unit (PHP ${{ matrix.php }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2', '8.3', '8.4']
steps:
- uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl, json, fileinfo
coverage: none
tools: composer:v2
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: Check coding standards
run: composer cs-check
- name: Static analysis
run: composer phpstan
- name: Unit tests
run: composer test
integration:
name: Integration (live API)
runs-on: ubuntu-latest
# Only run where the repository secrets are available: pushes to the main
# branch and tags. Pull requests (including from forks) skip the live suite.
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
needs: unit
steps:
- uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: curl, json, fileinfo
coverage: none
tools: composer:v2
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: Integration tests
env:
TB_KEY: ${{ secrets.TB_KEY }}
TB_SECRET: ${{ secrets.TB_SECRET }}
run: composer test:integration