Skip to content

ci(build): fix docker-compose command not found #72

ci(build): fix docker-compose command not found

ci(build): fix docker-compose command not found #72

Workflow file for this run

name: Build & test workflow
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: "20"
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable --prefer-offline
- name: Check types
run: yarn run typecheck
- name: Lint
run: yarn run lint
- name: Unit tests
run: yarn run test:ci
- name: Build frontend
run: yarn run build
- name: Check for backend
id: check-for-backend
run: |
if [ -f "Magefile.go" ]
then
echo "has-backend=true" >> $GITHUB_OUTPUT
fi
- name: Setup Go environment
if: steps.check-for-backend.outputs.has-backend == 'true'
uses: actions/setup-go@v3
with:
go-version: "1.22"
- name: Test backend
if: steps.check-for-backend.outputs.has-backend == 'true'
uses: magefile/mage-action@v2
with:
version: latest
args: coverage
- name: Build backend
if: steps.check-for-backend.outputs.has-backend == 'true'
uses: magefile/mage-action@v2
with:
version: latest
args: buildAll
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
- name: Start grafana docker
run: docker compose up -d
- name: Run Playwright tests
run: yarn playwright test
- name: Stop grafana docker
run: docker compose down
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30