Skip to content

GitHub Actions: Fix Update Data workflow; Make testscript stable #140

GitHub Actions: Fix Update Data workflow; Make testscript stable

GitHub Actions: Fix Update Data workflow; Make testscript stable #140

Workflow file for this run

name: Test
on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions: {}
jobs:
pest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
coverage: xdebug
- uses: ramsey/composer-install@v3
- run: composer pest:unit -- --coverage-clover coverage-unit.xml --ci
- uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage-unit.xml
codecov:
needs: pest
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v5
- uses: actions/download-artifact@v5
with:
name: coverage
- uses: codecov/codecov-action@v5
with:
use_oidc: true
fail_ci_if_error: true
disable_search: true
files: coverage-unit.xml
flags: unit
bin:
runs-on: ubuntu-latest
env:
GOFLAGS: '-mod=mod'
steps:
- uses: actions/checkout@v5
- uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
coverage: none
- uses: ramsey/composer-install@v3
with:
composer-options: '--no-dev --prefer-dist'
- name: Add bin into PATH
run: echo "${WORKSPACE}/bin" >> "$GITHUB_PATH"
env:
WORKSPACE: ${{ github.workspace }}
- uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
- name: Print php-matrix binary path
run: go test -count=1 -v ./internal
- run: go test -count=1 ./...