added codcov token; impossible to one-shot it with CI :/ #2
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
name: build_env_run_tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: # Allows running manually from Github's 'Actions' tab | |
jobs: | |
build_env_run_tests: | |
name: Build env and run tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Set up environment, run tests. | |
run: | | |
python -m venv env | |
source env/bin/activate | |
python -m pip install -e . | |
python -m pytest -n auto --cov=nanogpt --cov-report=xml | |
- name: Upload test coverage report to codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
verbose: true |