-
Notifications
You must be signed in to change notification settings - Fork 158
60 lines (55 loc) · 1.44 KB
/
ci.yml
File metadata and controls
60 lines (55 loc) · 1.44 KB
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
56
57
58
59
60
name: CI
on:
push:
tags:
- v*
branches:
- master
pull_request:
branches-ignore:
- gh-pages
schedule:
# Run daily at 01:34, so we get notified if CI is broken before a pull request
# is submitted.
- cron: "34 1 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: read
checks: write
actions: read
security-events: write
jobs:
lint:
uses: ./.github/workflows/lint.yml
test:
uses: ./.github/workflows/test.yml
build:
uses: ./.github/workflows/build.yml
# A single job that succeeds if all jobs listed under 'needs' succeed.
# This allows to configure a single job as a required check.
# The 'needed' jobs then can be changed through pull-requests.
all-jobs-succeeded:
name: All jobs succeeded
if: always()
# the if clauses below have to reflect the number of jobs listed here
needs:
- lint
- test
- build
env:
RESULTS: ${{ join(needs.*.result, ',') }}
runs-on: ubuntu-latest
steps:
- name: "Success"
# we expect all required jobs to have success result
if: env.RESULTS == 'success,success,success'
run: true
shell: bash
- name: "Failure"
# we expect all required jobs to have success result, fail otherwise
if: env.RESULTS != 'success,success,success'
run: false
shell: bash