-
Andreas Ellewsen authored
Force clean up of the virtual env before update and use python3.10 everywhere
Andreas Ellewsen authoredForce clean up of the virtual env before update and use python3.10 everywhere
image: python:3.10-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.10-buster
stage: venv update
script:
- make clean
- make install
backend lint:
before_script:
- python -V
image: python:3.10-buster
stage: tests and linting
script:
- make lint
backend test:
before_script:
- python -V
image: python:3.10-buster
stage: tests and linting
script:
- make test
artifacts:
reports:
cobertura: coverage.xml
backend build:
before_script:
- python -V
image: python:3.10-buster
stage: tests and linting
script:
- pip install poetry
- poetry build
frontend test:
image: node:16-alpine
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:
image: node:16-alpine
stage: tests and linting
script:
- cd frontend
- npm install -g npm@latest
- npm ci
- npm run lint