Skip to content

Commit

Permalink
👷 Updating github actions.
Browse files Browse the repository at this point in the history
+ seperating code cov upload to seperate workflow
  • Loading branch information
cdelcastillo21 committed Oct 21, 2023
1 parent 41c5085 commit c7f2b6c
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Example workflow for Codecov
on: [pull_request]
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
env:
OS: ${{ matrix.os }}
PYTHON: '3.12'
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install pytest-cov
- name: Generate coverage report
run: |
pytest \
--cov-report term-missing \
--cov-report xml:cov.xml \
--cov pyslurmtq
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: true
files: cov.xml
flags: unittests
name: codecov-umbrella
verbose: true
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Tests

on:
- pull_request
push:
branches: [master]

# on:
# push:
Expand Down

0 comments on commit c7f2b6c

Please sign in to comment.