Skip to content

Commit 59e9931

Browse files
authored
Merge pull request #13 from Stoops-ML/codecov
Run codecov from main on push
2 parents 29c876f + b944802 commit 59e9931

File tree

2 files changed

+29
-35
lines changed

2 files changed

+29
-35
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Upload codecov from main
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
codecov-of-main:
10+
name: codecov of main
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Setup Python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: "3.11"
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
python -m pip install .[dev]
22+
- name: Generate coverage report
23+
run: python -m pytest --cov --cov-report=xml
24+
- name: Upload coverage to Codecov
25+
uses: codecov/codecov-action@v5
26+
with:
27+
token: ${{ secrets.CODECOV_TOKEN }}
28+
slug: Stoops-ML/czml3
29+
verbose: true

.github/workflows/workflow.yml

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,6 @@ name: Run checks
33
on: [pull_request]
44

55
jobs:
6-
codecov-of-main:
7-
name: codecov of main
8-
runs-on: ubuntu-latest
9-
steps:
10-
- uses: actions/checkout@v4
11-
with:
12-
ref: main
13-
fetch-depth: 0
14-
- name: Get commit hash of main branch
15-
id: get-main-commit
16-
run: |
17-
echo "commit_hash=$(git rev-parse HEAD)" >> $GITHUB_ENV
18-
echo "The commit hash of the main branch is ${{ env.commit_hash }}"
19-
- name: Setup Python
20-
uses: actions/setup-python@v4
21-
with:
22-
python-version: "3.11"
23-
- name: Install dependencies
24-
run: |
25-
python -m pip install --upgrade pip
26-
python -m pip install .[dev]
27-
- name: Generate coverage report
28-
run: python -m pytest --cov --cov-report=xml
29-
- name: Upload coverage to Codecov
30-
uses: codecov/codecov-action@v5
31-
with:
32-
fail_ci_if_error: false
33-
token: ${{ secrets.CODECOV_TOKEN }}
34-
slug: Stoops-ML/czml3
35-
verbose: true
36-
override_commit: ${{ env.commit_hash }}
37-
override_branch: main
38-
396
tox-checks:
407
runs-on: ubuntu-latest
418
strategy:
@@ -56,8 +23,6 @@ jobs:
5623

5724
codecov-of-PR:
5825
name: codecov of PR
59-
needs:
60-
- codecov-of-main
6126
runs-on: ubuntu-latest
6227
steps:
6328
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)