Skip to content
This repository was archived by the owner on Dec 28, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/codecov_py.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Workflow to codecov

name: Run codecov
# Runs on push to any branch
on:
push:
pull_request:
branches:
- master
# Workflow can be triggered manually from the Actions tab
workflow_dispatch:

jobs:
# Run tests
codecov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout
- uses: actions/setup-python@v4
name: Set up Python 3.10
with:
python-version: '3.10'
- name: Install python dependencies
run: pip install -r controller/requirements.txt
- name: Run unit tests with code coverage
run: coverage run -m pytest
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
timeout-minutes: 1
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout
- uses: actions/setup-node@v1
name: Set up with Node 16
with:
node-version: '16.x'
- name: Install CI dependencies
run: npm ci
- name: Run unit tests with code coverage
run: npm run coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
"scripts": {
"test": "jest test",
"coverage": "jest --coverage --collectCoverageFrom='src/**/*.{ts,tsx}'",
"ts-coverage": "typescript-coverage-report",
"server": "npx ts-node src/server/server.ts"
},
Expand Down