-
Notifications
You must be signed in to change notification settings - Fork 10
78 lines (72 loc) · 2.19 KB
/
ci.yaml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: CI
env:
MIRRORD_TELEMETRY: false
on:
workflow_dispatch:
push:
branches-ignore: [ staging-squash-merge.tmp ]
pull_request:
branches: [ main, staging, trying ]
types: [ opened, synchronize, reopened, ready_for_review ]
# Cancel previous runs on the same PR.
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
towncrier_check:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v2
- run: uv python install
- run: uv venv
- name: install towncrier
run: uv pip install towncrier==23.11.0
- name: verify newsfragment exist
run: uv run towncrier check
lint_markdown:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: avto-dev/markdown-lint@v1
with:
config: "markdownlint-config.json"
args: "README.md"
lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
- name: Run ktlint
run: ./gradlew ktlintCheck
e2e:
uses: ./.github/workflows/reusable_e2e.yaml
ci-success:
name: ci
# We want this to run even if some of the required jobs got skipped
if: always()
needs:
[
towncrier_check,
e2e,
lint_markdown,
lint,
]
runs-on: ubuntu-24.04
steps:
- name: CI succeeded
# We have to do it in the shell since if it's in the if condition
# then skipping is considered success by branch protection rules
env:
CI_SUCCESS: ${{ (needs.towncrier_check.result == 'success') &&
(needs.e2e.result == 'success' || needs.e2e.result == 'skipped') &&
(needs.lint_markdown.result == 'success' || needs.lint_markdown.result == 'skipped') &&
(needs.lint.result == 'success' || needs.lint.result == 'skipped') }}
run: echo $CI_SUCCESS && if [ "$CI_SUCCESS" == "true" ]; then echo "SUCCESS" && exit 0; else echo "Failure" && exit 1; fi