Skip to content

Commit

Permalink
Issue #229 Separate CI Job for CodeCov (#230)
Browse files Browse the repository at this point in the history
* Issue #229 Separate CI Job for CodeCov

* Issue #229 Separate CI Job for CodeCov

* Issue #229 Separate CI Job for CodeCov

* Issue #229 Separate CI Job for CodeCov
  • Loading branch information
dan-fritchman authored Jul 3, 2024
1 parent cf3fc7b commit 5633bc6
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
name: test

on:
push:
pull_request:
branches:
- main
Expand Down Expand Up @@ -62,18 +61,42 @@ jobs:
python${{ matrix.python-version }} -m pip install pydantic${{ matrix.pydantic-version }}
python${{ matrix.python-version }} -m pytest -sv --cov=./ --cov-report=xml
# Seperate jobs for black and codecov, not subject to the dependency matrix
codecov:
runs-on: ubuntu-latest
container: tpluck95/vlsir-test-container

steps:
- name: Checkout Repo
uses: actions/checkout@v3

# This is the same fairly long passage as above, with Python 3.11 and "latest Pydantic" hard-coded.
- name: Set up Python 3.11
run: |
apt update -y && apt upgrade -y
apt install -y python3.11 python3.11-dev python3.11-venv python3.11-distutils
python3.11 -m pip install pytest
python3.11 -m pip install -Iv black==22.6
- name: pytest `HDL21`
run: |
python3.11 -m venv ./venv
. ./venv/bin/activate
bash scripts/install-dev.sh
python3.11 -m pip install pydantic
python3.11 -m pytest -sv --cov=./ --cov-report=xml
- name: Upload coverage to Codecov # Adapted from https://github.com/codecov/codecov-action#usage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: true
fail_ci_if_error: false
path_to_write_report: ./coverage/codecov_report.txt
verbose: true

# Seperate job for black, to remove all of the venv noise that we've created above
black:
runs-on: ubuntu-latest

Expand Down

0 comments on commit 5633bc6

Please sign in to comment.