Skip to content

Commit

Permalink
Merge pull request #5 from Adal3n3/step2
Browse files Browse the repository at this point in the history
step2: upload coverage reports to Codecov
  • Loading branch information
Adal3n3 authored Apr 23, 2024
2 parents f9874be + 79d45ad commit 366e107
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/.circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 2.1

orbs:
codecov: codecov/[email protected]

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

workflows:
version: 2.1
build-test:
jobs:
- test-api

21 changes: 21 additions & 0 deletions .github/workflows/api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: API workflow

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
name: Test python API
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install requirements
run: pip install -r api/requirements.txt
- name: Run tests and collect coverage
run: pytest --cov=api.calculator --cov-report=xml
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 366e107

Please sign in to comment.