Skip to content

Commit c1f1ac8

Browse files
fix: run in and outside container
1 parent 2434e92 commit c1f1ac8

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,53 @@ name: Workflow for Codecov example-python
22
on: [push, pull_request]
33
jobs:
44
run:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Checkout
8+
uses: actions/checkout@v4
9+
with:
10+
fetch-depth: 0
11+
- name: Set up Python 3.10
12+
uses: actions/setup-python@v4
13+
with:
14+
python-version: '3.10'
15+
- name: Install dependencies
16+
run: pip install -r requirements.txt
17+
- name: Run tests and collect coverage
18+
run: pytest --cov app
19+
20+
- name: Upload coverage to Codecov using uploader
21+
run: |
22+
curl -Os https://uploader.codecov.io/v0.7.1/linux/codecov
23+
chmod u+x codecov
24+
25+
./codecov -Z -v
26+
rm ./codecov
27+
env:
28+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
29+
30+
- name: Upload coverage to Codecov using CLI
31+
run: |
32+
curl -Os https://cli.codecov.io/v0.4.6/linux/codecov
33+
chmod u+x codecov
34+
35+
#./codecov --auto-load-params-from GithubActions create-commit -Z
36+
#./codecov --auto-load-params-from GithubActions create-report -Z
37+
#./codecov --auto-load-params-from GithubActions do-upload -Z
38+
./codecov -v create-commit -Z --git-service github
39+
./codecov -v create-report -Z --git-service github
40+
./codecov -v do-upload -Z --git-service github
41+
env:
42+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
43+
44+
- name: Upload coverage to Codecov
45+
uses: codecov/codecov-action@v4
46+
with:
47+
verbose: true
48+
fail_ci_if_error: true
49+
env:
50+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
51+
run-docker:
552
runs-on: ubuntu-latest
653
container:
754
image: python:3.10

0 commit comments

Comments
 (0)