-
Notifications
You must be signed in to change notification settings - Fork 1
148 lines (147 loc) · 4 KB
/
ci.yaml
File metadata and controls
148 lines (147 loc) · 4 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# This file was generated using Kotlin DSL (.github/workflows/ci.main.kts).
# If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file.
# Generated with https://github.com/typesafegithub/github-workflows-kt
name: 'CI'
on:
push:
branches:
- 'master'
pull_request:
branches:
- 'master'
jobs:
check_yaml_consistency:
name: 'Check YAML consistency'
runs-on: 'ubuntu-latest'
steps:
- id: 'step-0'
name: 'Check out'
uses: 'actions/checkout@v4'
- id: 'step-1'
name: 'Execute script'
run: 'rm ''.github/workflows/ci.yaml'' && ''.github/workflows/ci.main.kts'''
- id: 'step-2'
name: 'Consistency check'
run: 'git diff --exit-code ''.github/workflows/ci.yaml'''
core:
runs-on: 'ubuntu-latest'
needs:
- 'check_yaml_consistency'
steps:
- id: 'step-0'
name: 'Check out'
uses: 'actions/checkout@v4'
- id: 'step-1'
name: 'Set up JDK 8'
uses: 'actions/setup-java@v4'
with:
java-version: '8'
distribution: 'temurin'
- id: 'step-2'
name: 'Build core'
run: './gradlew :core:build'
android:
runs-on: 'ubuntu-latest'
needs:
- 'check_yaml_consistency'
steps:
- id: 'step-0'
name: 'Check out'
uses: 'actions/checkout@v4'
- id: 'step-1'
name: 'Set up JDK 17'
uses: 'actions/setup-java@v4'
with:
java-version: '17'
distribution: 'temurin'
- id: 'step-2'
name: 'Set up Android SDK'
uses: 'android-actions/setup-android@v3'
- id: 'step-3'
name: 'Set up JDK 8'
uses: 'actions/setup-java@v4'
with:
java-version: '8'
distribution: 'temurin'
- id: 'step-4'
name: 'Build android'
run: './gradlew :android:build'
cli:
runs-on: 'ubuntu-latest'
needs:
- 'check_yaml_consistency'
steps:
- id: 'step-0'
name: 'Check out'
uses: 'actions/checkout@v4'
- id: 'step-1'
name: 'Set up JDK 8'
uses: 'actions/setup-java@v4'
with:
java-version: '8'
distribution: 'temurin'
- id: 'step-2'
name: 'Build CLI'
run: './gradlew :cli:build'
- id: 'step-3'
name: 'Upload coverage to Codecov'
uses: 'codecov/codecov-action@v4'
web-e2e:
runs-on: 'ubuntu-latest'
needs:
- 'check_yaml_consistency'
steps:
- id: 'step-0'
name: 'Check out'
uses: 'actions/checkout@v4'
- id: 'step-1'
name: 'Set up JDK 17'
uses: 'actions/setup-java@v4'
with:
java-version: '17'
distribution: 'temurin'
- id: 'step-2'
name: 'E2E smoke test'
run: './gradlew :web-e2e:test'
web:
runs-on: 'ubuntu-latest'
permissions:
contents: 'write'
needs:
- 'check_yaml_consistency'
steps:
- id: 'step-0'
name: 'Check out'
uses: 'actions/checkout@v4'
- id: 'step-1'
name: 'Set up JDK 8'
uses: 'actions/setup-java@v4'
with:
java-version: '8'
distribution: 'temurin'
- id: 'step-2'
name: 'Build web'
run: './gradlew :web:build'
- id: 'step-3'
name: 'Deploy to GitHub Pages'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: |-
set -e
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git clone --single-branch --branch gh-pages \
https://x-access-token:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git gh-pages
cd gh-pages
git checkout --orphan gh-pages-new
git rm -rf .
cd ..
cp -av web/build/distributions gh-pages
cd gh-pages
mv distributions/* .
git add -A
git commit -m "Deploy to GitHub Pages: $GITHUB_SHA" --allow-empty
git branch -D gh-pages 2>/dev/null || true
git branch -m gh-pages-new gh-pages
git push --force origin gh-pages
if: '${{ github.ref == ''refs/heads/master'' && github.event_name == ''push'' }}'