Skip to content

Commit

Permalink
go based codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Mar 14, 2024
1 parent fd2144b commit fb7f4a3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 34 deletions.
47 changes: 13 additions & 34 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,18 @@
name: Codecov

on: [push]
on: [pull_request]

jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]

env:
OS: ${{ matrix.os }}
PYTHON: '3.11'

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: ${{ env.PYTHON }}

- name: Generate coverage report
run: |
pip install pytest
pip install pytest-cov
pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage1.xml,./coverage2.xml,!./cache
flags: unittests
name: codecov-umbrella
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: Run coverage
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4-beta
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ cache
state

configs/logs.json

coverage.txt

0 comments on commit fb7f4a3

Please sign in to comment.