Skip to content

Ausschreibung 2026 #2915

Ausschreibung 2026

Ausschreibung 2026 #2915

Workflow file for this run

name: XCCup CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: 👀 Checkout repo
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: 🕸 Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
#cache: "pnpm"
- name: 🙄 Check for "only" in test files (client)
working-directory: ./client/cypress/e2e
# Grep will exit with 1 if no matching line in any file was found
# Therefore we will invert the result of grep
# Exit codes !0 will fail the whole workflow
run: (! grep -r "it.only" .)
- name: Check for "only" in test files (server)
working-directory: ./server/test
run: (! grep -r "test.only" .)
- name: 🖥 Install backend
run: chmod -R 777 . && docker compose -f docker-compose-ci.yml run --rm pnpm install
working-directory: ./server
- name: 🚿 Lint backend
run: docker compose -f docker-compose-ci.yml run --rm pnpm run lint
working-directory: ./server
- name: 🕵️ Add secrets to ENV
run: echo "METAR_API_KEY=${{ secrets.METAR_API_KEY }}" >> ./.env.ci
working-directory: ./server
- name: 🧪 Test backend
run: docker compose -f docker-compose-ci.yml run --rm -e NODE_ENV=CI pnpm run test
working-directory: ./server
- name: 🐳 Start Docker Backend Environment
run: docker compose -f docker-compose-ci.yml --env-file ./.env.ci up -d
working-directory: ./server
- name: 📝 List all databases (just for debugging)
run: sleep 10 && docker exec db psql -U xccup_user -l
- name: 🛠 Setup DB (enable PostGIS and set correct timezone)
run: docker exec db psql -U xccup_user xccup_db -c "set timezone='Europe/Berlin'"
working-directory: ./server
- name: 💻 Install and build frontend
run: pnpm install && pnpm run build-local
working-directory: ./client
- name: 🖨 Print current server log before testing (just for debugging)
run: docker logs server
- name: 🏃‍♀️ Cypress run
uses: cypress-io/github-action@v6
with:
install: false
start: docker compose -f docker-compose-ci.yml up -d
wait-on: http://localhost:4173
working-directory: ./client
config: baseUrl=http://localhost:4173
browser: chrome
env: TZ=Europe/Berlin
- name: 😩 Store artifacts of test failures
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: ./client/cypress/screenshots
- name: 🤨 Store artifacts of server logs
uses: actions/upload-artifact@v4
if: always()
with:
name: server-logs
path: ./server/data/logs