-
-
Notifications
You must be signed in to change notification settings - Fork 504
62 lines (57 loc) · 1.68 KB
/
pull_request_js.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
# Jobs run on pull request in js folders
name: Pull request JS
on:
pull_request:
branches:
- main
paths: # Only run when changes are made to js code
- 'website/**'
- 'editors/**'
# - 'crates/**'
- 'packages/@biomejs/js-api/**'
# Cancel jobs when the PR is updated
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
env:
RUST_LOG: info
RUST_BACKTRACE: 1
jobs:
format-js:
name: Check JS Files
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run Biome Format
run: cargo biome-cli-dev ci editors website packages/@biomejs/js-api
type-check:
name: Type-check JS Files
runs-on: ubuntu-latest
steps:
- name: Checkout PR Branch
uses: actions/checkout@v4
- uses: jetli/wasm-pack-action@v0.4.0
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v2.2.4
with:
version: 8
- name: Install toolchain
uses: moonrepo/setup-rust@v1
- name: Build WASM module for the web
run: wasm-pack build --out-dir ../../packages/@biomejs/wasm-web --target web --scope biomedev crates/biome_wasm
- name: Install libraries
working-directory: website
run: pnpm i
- name: Build JS
working-directory: website
run: pnpm build:js
- name: Type check
working-directory: website
run: pnpm tsc