Newer
Older
image: python:3.9-buster
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip
- venv/ # makes the virtual env available for jobs
stages:
- venv update # Keep the cached virtual env up to date with dependencies
- tests and linting # Run test/linting for frontend and backend
update:
before_script:
- python -V
image: python:3.9-buster
stage: venv update
backend lint:
before_script:
- python -V
image: python:3.9-buster
stage: tests and linting
script:
backend test:
before_script:
- python -V
image: python:3.9-buster
stage: tests and linting
script:
artifacts:
reports:
cobertura: coverage.xml
before_script:
- python -V
image: python:3.9-buster
stage: tests and linting
script:
- cd frontend
- npm install -g npm@latest
- npm ci
- npm run coverage:ci
coverage:
'/All files[^|]*\|[^|]*\s+([\d\.]+)/'
frontend lint:
stage: tests and linting
script:
- cd frontend
- npm install -g npm@latest
- npm ci
- npm run lint
script:
- cd frontend
- npm install -g npm@latest
- NODE_ENV=production
- npm ci
- npm run build:no-env