-
Notifications
You must be signed in to change notification settings - Fork 71
148 lines (115 loc) · 3.2 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
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
name: CI
on:
push:
branches-ignore:
- 'master'
- 'develop'
- 'v4-dev'
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
compile-themes:
name: Compile themes
uses: ./.github/workflows/_compile-themes.yml
render-test-pages:
name: Render test pages
uses: ./.github/workflows/_render-test-pages.yml
with:
force-render: NO
upload-policy: conditionally
create-screenshots:
name: Create screenshots
uses: ./.github/workflows/_create-screenshots.yml
needs: [ compile-themes, render-test-pages ]
detect-changes:
name: Detect changes
runs-on: ubuntu-latest
needs: [ render-test-pages, create-screenshots ]
steps:
- name: Checkout branch
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: .tmp
- name: Unpack artifacts
run: find .tmp -name "*.tar" -type f -exec tar -xf {} \;
- name: Compare artifacts
run: |
HAS_CHANGES=0
HAS_NEW=0
git diff --exit-code --quiet -- tests/ || HAS_CHANGES=1
[[ $(git ls-files --others --exclude-standard tests/) ]] && HAS_NEW=1
echo "HAS_CHANGES=$HAS_CHANGES" >> $GITHUB_ENV
echo "HAS_NEW=$HAS_NEW" >> $GITHUB_ENV
- name: Setup git user
run: |
git config user.name "kendo-bot"
git config user.email "[email protected]"
- name: Push changes to GitHub
if: ${{ (env.HAS_CHANGES == 1 || env.HAS_NEW == 1) }}
env:
GH_TOKEN: ${{ github.token }}
run: |
echo "Visual tests have detected changes. Updating markup and screenshots."
git add tests/
git commit -m "chore: update visual previews"
git push
echo "Mark checks as successful"
commit=$(git rev-parse HEAD)
./build/mark-checks.sh $commit
ci-visual:
name: Status check > Visual
runs-on: ubuntu-latest
needs: [ detect-changes ]
steps:
- name: Done
run: echo "Done!"
lint-scripts:
name: Lint scripts
uses: ./.github/workflows/_lint-scripts.yml
ci-lint-scripts:
name: Status check > Lint scripts
runs-on: ubuntu-latest
needs: [ lint-scripts ]
steps:
- name: Done
run: echo "Done!"
lint-styles:
name: Lint styles
uses: ./.github/workflows/_lint-styles.yml
ci-lint-styles:
name: Status check > Lint styles
runs-on: ubuntu-latest
needs: [ lint-styles ]
steps:
- name: Done
run: echo "Done!"
ci-a11y:
name: Status check > A11y
needs: [ compile-themes, render-test-pages ]
uses: ./.github/workflows/_test-contrast.yml
with:
max-chunks: 4
# placeholder
# replace placeholder with ci
placeholder-unit:
name: Status check > Unit
runs-on: ubuntu-latest
steps:
- name: Done
run: echo "Done!"
# temporary until we change checks
temp-unit:
name: CI | Unit
runs-on: ubuntu-latest
steps:
- name: Done
run: echo "Done!"
temp-visual:
name: CI | Visual
runs-on: ubuntu-latest
steps:
- name: Done
run: echo "Done!"