Skip to content

Commit defbe9f

Browse files
authored
Moved update-cov-report action to a separate file (#361)
1 parent dfac399 commit defbe9f

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,20 @@ name: CI
33
on:
44
pull_request:
55
workflow_dispatch:
6-
push:
7-
branches: [ main ]
86

97
concurrency:
108
group: ${{ github.workflow }}-${{ github.ref }}
119
cancel-in-progress: true
1210

1311
jobs:
1412
auto-assigner:
15-
if: ${{ github.event_name == 'pull_request' }}
1613
runs-on: ubuntu-latest
1714

1815
steps:
1916
- name: Auto-assign
2017
uses: toshimaru/[email protected]
2118

2219
labeler:
23-
if: ${{ github.event_name == 'pull_request' }}
2420
runs-on: ubuntu-latest
2521

2622
steps:
@@ -35,7 +31,6 @@ jobs:
3531
configuration-path: .github/labeler.yaml
3632

3733
pre-commit:
38-
if: ${{ github.event_name == 'pull_request' }}
3934
runs-on: ubuntu-latest
4035

4136
steps:
@@ -51,7 +46,6 @@ jobs:
5146
uses: pre-commit/[email protected]
5247

5348
docs:
54-
if: ${{ github.event_name == 'pull_request' }}
5549
needs: pre-commit
5650
runs-on: ubuntu-latest
5751

@@ -68,7 +62,6 @@ jobs:
6862
run: pydoctor --docformat=epytext luxonis_ml
6963

7064
type-check:
71-
if: ${{ github.event_name == 'pull_request' }}
7265
needs: pre-commit
7366
runs-on: ubuntu-latest
7467

@@ -96,7 +89,7 @@ jobs:
9689
project: pyproject.toml
9790

9891
semgrep:
99-
if: ${{ github.actor != 'dependabot[bot]' && github.event_name == 'pull_request' }})
92+
if: ${{ github.actor != 'dependabot[bot]' }})
10093
needs: pre-commit
10194
runs-on: ubuntu-latest
10295
container:
@@ -149,7 +142,6 @@ jobs:
149142
matrix:
150143
os: [ ubuntu-latest, windows-latest ]
151144

152-
if: ${{ github.event_name == 'pull_request' }}
153145
needs: [type-check, semgrep]
154146
runs-on: ${{ matrix.os }}
155147

@@ -213,29 +205,6 @@ jobs:
213205
path: coverage.xml
214206
overwrite: true
215207

216-
update-base-report:
217-
if: ${{ github.event_name == 'push' }}
218-
runs-on: ubuntu-latest
219-
220-
steps:
221-
- name: Checkout
222-
uses: actions/checkout@v4
223-
with:
224-
ref: ${{ github.head_ref }}
225-
226-
- name: Download artifacts
227-
uses: dawidd6/action-download-artifact@v7
228-
with:
229-
name: coverage
230-
path: coverage.xml
231-
workflow: ci.yaml
232-
233-
- name: Upload coverage results to Codecov
234-
uses: codecov/codecov-action@v4
235-
with:
236-
token: ${{ secrets.CODECOV_TOKEN }}
237-
fail_ci_if_error: false
238-
239208

240209
check-requirements:
241210
if: ${{ startsWith(github.head_ref, 'release/') }}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Update Coverage Report
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
jobs:
8+
update-base-report:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
suite: [unit, predefined, combinations, misc]
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
ref: ${{ github.head_ref }}
19+
20+
- name: Download artifacts
21+
uses: dawidd6/action-download-artifact@v7
22+
with:
23+
name: coverage-${{ matrix.suite }}
24+
path: coverage.xml
25+
workflow: ci.yaml
26+
27+
- name: Upload coverage results to Codecov
28+
uses: codecov/codecov-action@v4
29+
with:
30+
token: ${{ secrets.CODECOV_TOKEN }}
31+
fail_ci_if_error: false

0 commit comments

Comments
 (0)