Skip to content

Commit

Permalink
feat: add GitHub CI
Browse files Browse the repository at this point in the history
- CI tests
- CodeCov for coverage
- README badges
  • Loading branch information
mjaquiery authored Nov 12, 2024
1 parent 3ecf835 commit 047901d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
on: push
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.11", "3.12", "3.13" ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- uses: actions/checkout@v4
- name: Install dependencies
run: pip install -r requirements.txt
- name: Install CodeCov dependencies
run: pip install pytest pytest-cov
- name: Install self
run: pip install -e .
- name: Run tests
run: |
cd tests
pytest --cov --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./tests/coverage.xml
flags: unittests
fail_ci_if_error: false
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Treatment Resistant Depression Database Command Line Interface

[![.github/workflows/test.yml](https://github.com/OxfordRSE/trd-cli/actions/workflows/test.yml/badge.svg)](https://github.com/OxfordRSE/trd-cli/actions/workflows/test.yml)
[![codecov](https://codecov.io/github/OxfordRSE/trd-cli/graph/badge.svg?token=myj04HCbDQ)](https://codecov.io/github/OxfordRSE/trd-cli)

This CLI performs automated data collection and curation for the TRD Database project.

## Deployment
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
click==8.1.7
pycap==2.6.0
requests==2.32.3
typing_extensions==4.12.2

0 comments on commit 047901d

Please sign in to comment.