-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd2144b
commit fb7f4a3
Showing
2 changed files
with
15 additions
and
34 deletions.
There are no files selected for viewing
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
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 }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,5 @@ cache | |
state | ||
|
||
configs/logs.json | ||
|
||
coverage.txt |