bilhej/.forgejo/workflows/ci.yml
Joakim Mörling 076fe1b299
Some checks failed
CI / Lint, type check, unit tests, coverage (push) Failing after 1m43s
CI / E2E browser tests (push) Failing after 2s
fix: replace actions/checkout with direct git clone to preserve /git/ subpath
- Replace actions/checkout@v4 with git clone in both jobs
- Clone URL: https://x-access-token:${FORGEJO_TOKEN}@srvr.nu/git/jocke/bilhej.git
- The checkout action constructed https://srvr.nu/jocke/bilhej/ dropping the /git/ subpath
- FORGEJO_TOKEN is automatically injected by Forgejo at runtime
- Remove ineffective GITHUB_SERVER_URL env var
2026-05-19 16:24:48 +02:00

76 lines
2 KiB
YAML

name: CI
on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]
jobs:
lint-and-test:
name: Lint, type check, unit tests, coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repository
run: |
git clone --depth 1 \
https://x-access-token:${FORGEJO_TOKEN}@srvr.nu/git/jocke/bilhej.git .
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
cache-dependency-path: frontend/package-lock.json
- uses: https://github.com/actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Install frontend dependencies
run: npm ci
working-directory: frontend
- name: Lint
run: npm run lint
working-directory: frontend
- name: Type check
run: npx vue-tsc --noEmit
working-directory: frontend
- name: Frontend unit tests
run: npm run test
working-directory: frontend
- name: Backend unit tests
run: ./gradlew :backend:test
- name: Coverage verification
run: |
./gradlew :backend:jacocoTestCoverageVerification
npm run test:coverage
working-directory: frontend
e2e:
name: E2E browser tests
runs-on: ubuntu-latest
env:
POSTGRES_DB: bilhej
POSTGRES_USER: bilhej
POSTGRES_PASSWORD: test_pw_ci_123
JWT_SECRET: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
STRIPE_SECRET_KEY: sk_test_fake
STRIPE_WEBHOOK_SECRET: whsec_fake
STRIPE_PRICE_ID: price_fake
steps:
- name: Checkout repository
run: |
git clone --depth 1 \
https://x-access-token:${FORGEJO_TOKEN}@srvr.nu/git/jocke/bilhej.git .
- name: Run E2E test stack
run: |
docker compose \
-f docker-compose.ci.yml \
up --build --abort-on-container-exit --exit-code-from playwright