-
Notifications
You must be signed in to change notification settings - Fork 3
68 lines (61 loc) · 1.9 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
name: ci
on:
push:
branches:
- main
paths-ignore:
- 'action-surefire-report/**'
pull_request:
paths-ignore:
- 'action-surefire-report/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: |
block-commits/package-lock.json
github-app-token/yarn.lock
slash-command-dispatch/package-lock.json
- name: Build and test block-commits
working-directory: block-commits
run: |
npm ci
npm run build --if-present
npm test
- name: Build and test github-app-token
working-directory: github-app-token
run: |
yarn install --frozen-lockfile
yarn run yarn-deduplicate --fail
yarn run build
- name: Build and test slash-command-dispatch
working-directory: slash-command-dispatch
run: |
npm ci
npm run build
npm run format-check
npm run lint
npm run test
- name: Compare the expected and actual dist/ directories
run: |
if [ "$(git diff --ignore-space-at-eol github-app-token/dist/ | wc -l)" -gt "0" ] ||
[ "$(git diff --ignore-space-at-eol slash-command-dispatch/dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
id: diff
# If index.js was different than expected, upload the expected version as an artifact
- uses: actions/upload-artifact@v4
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist
path: |
github-app-token/dist/
slash-command-dispatch/dist/