45 lines
897 B
YAML
45 lines
897 B
YAML
stages:
|
|
- Test Stage
|
|
- Build Stage
|
|
- Release Stage
|
|
|
|
workflow:
|
|
rules:
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
- if: $CI_COMMIT_TAG
|
|
- if: $CI_COMMIT_BRANCH
|
|
|
|
"Python Tests":
|
|
stage: Test Stage
|
|
image: python:3.14-alpine
|
|
variables:
|
|
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
|
|
cache:
|
|
key:
|
|
files:
|
|
- backend/requirements.txt
|
|
paths:
|
|
- .cache/pip
|
|
script:
|
|
- echo "Running tests on the Python Backend..."
|
|
- cd backend
|
|
- pip install -r requirements.txt
|
|
- pytest
|
|
|
|
"React Tests":
|
|
stage: Test Stage
|
|
image: node:alpine
|
|
variables:
|
|
npm_config_cache: "$CI_PROJECT_DIR/.npm-cache"
|
|
cache:
|
|
key:
|
|
files:
|
|
- frontend/package-lock.json
|
|
paths:
|
|
- .npm-cache
|
|
- frontend/node_modules
|
|
script:
|
|
- cd frontend
|
|
- npm ci --prefer-offline
|
|
- npm test -- run --exclude "**/*.live.test.ts"
|