Skip to content

WIP: Version 2

WIP: Version 2 #177

Workflow file for this run

on:
push:
branches: ["main"]
paths: ["!.docs/**"]
pull_request:
branches: ["main"]
name: ci
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP with fail-fast
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
tools: composer
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: composer install --no-interaction
- run: |
npm ci
npm run build
- name: Upload workspace
uses: actions/upload-artifact@v4
with:
name: workspace
path: ${{ github.workspace }}
unit-tests:
runs-on: ubuntu-latest
needs: prepare
steps:
- name: Setup PHP with fail-fast
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
coverage: xdebug
- name: Download workspace
uses: actions/download-artifact@v4
with:
name: workspace
path: ${{ github.workspace }}
- name: Run unit tests
run: |
chmod +x ${{ github.workspace }}/vendor/bin/pest
${{ github.workspace }}/vendor/bin/pest --coverage-clover ./coverage.xml
- name: Upload to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
verbose: true
lint:
runs-on: ubuntu-latest
needs: prepare
steps:
- name: Download workspace
uses: actions/download-artifact@v4
with:
name: workspace
path: ${{ github.workspace }}
- name: Run linter
run: |
chmod +x ${{ github.workspace }}/vendor/bin/pint
${{ github.workspace }}/vendor/bin/pint --test