-
Notifications
You must be signed in to change notification settings - Fork 77
50 lines (40 loc) · 1.17 KB
/
review.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
name: review
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v4
- name: 🏗 Setup runner
uses: ./.github/actions/setup
- name: 📦 Install dependencies
run: bun install
- name: ✅ Lint code
run: bun run lint --max-warnings=0
- name: 🧪 Test code
run: bun run test
- name: 👷 Build code
run: bun run clean && bun run build
- name: 🕵️ Validate build
id: diff
run: |
if [ "$(git diff --ignore-space-at-eol build/ | wc -l)" -gt "0" ]; then
echo "⚠️ Build is outdated"
echo " > run 'bun run clean', 'bun run build', and commit changes"
git diff
exit 1
fi
- name: 🗂 Upload build
uses: actions/upload-artifact@v3
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: build
path: build/