chore: rebuild package-lock file #389
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: build | |
on: [push, pull_request] | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: extractions/setup-just@v2 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.3' | |
- run: docker network create traefik | |
- name: Setup Docker container | |
run: | | |
cp .env-example .env | |
cd src | |
cp .env-example .env | |
just setup | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: extractions/setup-just@v2 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.3' | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: Lint project | |
run: | | |
cd src | |
just install lint | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
phpversion: ['8.2', '8.3'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: extractions/setup-just@v2 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.phpversion }} | |
coverage: xdebug | |
- run: docker network create traefik | |
- name: Install Dependencies | |
run: | | |
cp .env-example .env | |
cd src | |
cp .env-example .env | |
just setup | |
- name: Run tests | |
run: | | |
cd src | |
just coverage | |
coverage: | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: extractions/setup-just@v2 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.3' | |
- name: Generate coverage report | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
cd src | |
just install coverage | |
./bin/php-coveralls --coverage_clover=build/logs/clover.xml -v | |
deploy: | |
if: github.ref == 'refs/heads/main' | |
needs: ['docker', 'lint', 'test'] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to Harvey | |
uses: distributhor/workflow-webhook@v2 | |
env: | |
webhook_type: 'json-extended' | |
webhook_url: ${{ secrets.WEBHOOK_URL }} | |
webhook_secret: ${{ secrets.WEBHOOK_SECRET }} | |
data: '{ "deployment_type": "deploy", "prod_compose": true, "healthcheck": ["glass-glass-1", "glass-glass-2", "glass-glass-db-1"] }' |