-
-
Notifications
You must be signed in to change notification settings - Fork 36
81 lines (77 loc) · 2.19 KB
/
validate.yaml
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
name: 🚀 Validation Pipeline
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
actions: write
contents: read
# Required to put a comment into the pull-request
pull-requests: write
jobs:
lint:
name: ⬣ Biome lint
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: Setup Biome
uses: biomejs/setup-biome@v2
- name: Run Biome
run: biome ci .
typecheck:
name: 🔎 Type check
runs-on: ubuntu-latest
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false
- name: 🔎 Type check
run: npm run typecheck
vitest:
name: ⚡ Unit Tests
runs-on: ubuntu-latest
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: 📥 Download deps
uses: bahmutov/npm-install@v1
with:
useLockFile: false
- name: Install dotenv cli
run: npm install -g dotenv-cli
- name: ⚡ Run vitest
run: npm run test:cov
# - name: "Report Coverage"
# Only works if you set `reportOnFailure: true` in your vite config as specified above
# if: always()
# uses: davelosert/vitest-coverage-report-action@v2
deploy-preview:
name: "🚀 Deploy Docs"
needs: [lint, typecheck, vitest]
uses: forge42dev/workflows/.github/workflows/deploy-to-fly.yaml@monorepo-matrix
with:
workspace_name: docs
set_cwd_to_workspace: true
github_environment: "docs-previev"
secrets:
fly_api_token: ${{ secrets.FLY_API_TOKEN }}