Skip to content

Commit

Permalink
add(tests and coverage workflow) (#130) (patch)
Browse files Browse the repository at this point in the history
add test coverage workflow
  • Loading branch information
ChrOertlin authored Apr 9, 2024
1 parent 7e1432e commit 7d1af11
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/tests_coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Tests and Coverage

on:
pull_request:
push:
branches:
- master

jobs:
tests-coverage:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/[email protected]

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false

- name: Cache dependencies
uses: actions/cache@v3
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('**/poetry.lock') }}

- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: poetry install --no-interaction

- name: Test with pytest & Coveralls
run: |
pytest --cov=genotype-api/
coveralls --service=github
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

finish:
needs: tests-coverage
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true

0 comments on commit 7d1af11

Please sign in to comment.