forked from hmarr/auto-approve-action
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (27 loc) · 798 Bytes
/
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
name: CI
on: [push, pull_request]
jobs:
test:
name: Lint and test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup nodejs
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: npm ci
- name: Check style with prettier
run: npm run format-check
- name: Run tests
run: npm test
- name: Compare the expected and actual dist/ directories
run: |
npm run build
if [ "$(git diff --ignore-blank-lines --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi