CI #3173
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
--- | |
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 }} |