-
Notifications
You must be signed in to change notification settings - Fork 10
55 lines (49 loc) · 1.39 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
# Periodically run CI for CodeQL security advisories etc, in case new checks
# are added.
schedule:
- cron: "39 12 * * 0"
jobs:
build-and-test:
name: Build and test
if: "!startsWith(github.head_ref, 'renovate/')" # Already covered by renovate-check.
uses: ROpdebee/mb-userscripts/.github/workflows/build-and-test.yml@main
upload-coverage:
name: Upload coverage to codecov
runs-on: ubuntu-latest
needs: build-and-test
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Download coverage artifacts
uses: actions/download-artifact@v4
with:
name: coverage
path: ./coverage
- name: Upload coverage data
uses: codecov/codecov-action@v4
with:
files: lcov.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
codeql:
name: CodeQL analysis
uses: ROpdebee/mb-userscripts/.github/workflows/codeql-analysis.yml@main
deploy:
needs: build-and-test
if: >
always()
&& github.event_name == 'push'
&& github.event.ref == 'refs/heads/main'
&& github.repository == 'ROpdebee/mb-userscripts'
uses: ROpdebee/mb-userscripts/.github/workflows/deploy.yml@main
with:
test-result: ${{ needs.build-and-test.result }}