-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f0344ab
commit 7190cc3
Showing
6 changed files
with
126 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,55 @@ | ||
version: 2.1 | ||
#version: 2.1 | ||
# | ||
#orbs: | ||
# codecov: codecov/codecov@4.0.1 | ||
# | ||
#jobs: | ||
# test-api: | ||
# docker: | ||
# - image: cimg/python:3.10.2 | ||
# steps: | ||
# - checkout | ||
# - run: | ||
# name: Install requirements | ||
# command: pip install -r api/requirements.txt | ||
# - run: | ||
# name: Run tests and collect coverage | ||
# command: pytest --cov api.calculator | ||
# - codecov/upload: | ||
# flags: backend | ||
# | ||
# test-frontend: | ||
# docker: | ||
# - image: cimg/node:17.6.0 | ||
# steps: | ||
# - checkout | ||
# - run: | ||
# name: Install requirements | ||
# command: cd web && npm install | ||
# - run: | ||
# name: Run tests and collect coverage | ||
# command: cd web && npm run test | ||
# - codecov/upload: | ||
# flags: frontend | ||
# | ||
#workflows: | ||
# version: 2.1 | ||
# build-test: | ||
# jobs: | ||
# - test-api | ||
# - test-frontend | ||
|
||
orbs: | ||
codecov: codecov/codecov@4.0.1 | ||
|
||
jobs: | ||
test-api: | ||
docker: | ||
- image: cimg/python:3.10.2 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Install requirements | ||
command: pip install -r api/requirements.txt | ||
- run: | ||
name: Run tests and collect coverage | ||
command: pytest --cov api.calculator | ||
- codecov/upload: | ||
flags: backend | ||
version: 2.1 | ||
|
||
test-frontend: | ||
docker: | ||
- image: cimg/node:17.6.0 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Install requirements | ||
command: cd web && npm install | ||
- run: | ||
name: Run tests and collect coverage | ||
command: cd web && npm run test | ||
- codecov/upload: | ||
flags: frontend | ||
setup: true | ||
|
||
orbs: | ||
path-filtering: circleci/path-filtering@0.1.1 | ||
|
||
workflows: | ||
version: 2.1 | ||
build-test: | ||
jobs: | ||
- test-api | ||
- test-frontend | ||
jobs: | ||
- path-filtering/filter: | ||
mapping: | | ||
api/.* test-api-job true | ||
web/.* test-frontend-job true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
codecov: codecov/codecov@3.2.2 | ||
|
||
parameters: | ||
test-api-job: | ||
type: boolean | ||
default: false | ||
test-frontend-job: | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
test-api: | ||
docker: | ||
- image: cimg/python:3.10.2 | ||
name: Install requirements | ||
command: pip install -r api/requirements.txt | ||
- run: | ||
name: Run tests and collect coverage | ||
command: pytest --cov --cov-report xml . | ||
- codecov/upload: | ||
flags: backend | ||
test-frontend: | ||
docker: | ||
- image: cimg/node:17.6.0 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Install requirements | ||
command: cd web && npm install | ||
- run: | ||
name: Run tests and collect coverage | ||
command: cd web && npm run test | ||
- codecov/upload: | ||
flags: frontend | ||
|
||
workflows: | ||
test-api-workflow: | ||
when: <<pipeline.parameters.test-api-job>> | ||
jobs: | ||
- test-api | ||
test-frontend-workflow: | ||
when: <<pipeline.parameters.test-frontend-job>> | ||
jobs: | ||
- test-frontend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters