Skip to content
Snippets Groups Projects
Commit 92cf194e authored by Victor Löfgren's avatar Victor Löfgren
Browse files

Resolve "Improve gitlab pipelines"

parent 7b12fa89
No related branches found
No related tags found
1 merge request!7Resolve "Improve gitlab pipelines"
stages: stages:
- server-test - setup
- client-install - test
- client-test
include: include:
- local: .gitlab/server.gitlab-ci.yml - local: .gitlab/server.gitlab-ci.yml
......
image: node:10 client:setup:
image: node:10
install: stage: setup
stage: client-install
script: script:
- cd client - cd client
- npm install - npm install
artifacts: artifacts:
name: "artifacts" name: "artifacts"
untracked: true untracked: true
expire_in: 60 mins expire_in: 15 mins
paths:
- client/.npm/
- client/node_modules/
cache:
key: "$CI_COMMIT_REF_SLUG"
paths: paths:
- client/.npm/ - client/.npm/
- client/node_modules/ - client/node_modules/
linting: client:linting:
stage: client-test image: node:10
stage: test
needs: ["client:setup"]
script: script:
- cd client - cd client
- npm run lint - npm run lint
dependencies:
- install
test:unit: client:test:
stage: client-test image: node:10
stage: test
needs: ["client:setup"]
script: script:
- cd client - cd client
- npm run test:coverage - npm run test:coverage
dependencies:
- install
coverage: /All files\s*\|\s*([\d\.]+)/ coverage: /All files\s*\|\s*([\d\.]+)/
server:setup:
test-server:
image: python image: python
stage: setup
artifacts:
paths:
- server/env
expire_in: 15 min
untracked: true
cache: cache:
key: "$CI_COMMIT_REF_SLUG"
paths: paths:
- server/env/ - server/env
stage: server-test
script: script:
- python --version - python --version
- pip install virtualenv - pip install virtualenv
...@@ -13,4 +17,12 @@ test-server: ...@@ -13,4 +17,12 @@ test-server:
- python -m venv env - python -m venv env
- source env/bin/activate - source env/bin/activate
- pip install -r requirements.txt - pip install -r requirements.txt
server:test:
image: python
stage: test
needs: ["server:setup"]
script:
- cd server
- source env/bin/activate
- pytest --cov app tests/ - pytest --cov app tests/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment