-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (51 loc) · 1.51 KB
/
typescript-lint.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
name: Cargo lint and test
on:
push:
branches: [ main ]
# pull_request:
# branches: [ main ]
env:
# Not needed in CI, should make things a bit faster
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
# Remove unnecessary WASM build artifacts
WASM_BUILD_CLEAN_TARGET: 1
# Stripping symbols and optimizing for binary size
RUSTFLAGS: -C strip=symbols -C opt-level=s
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: true
jobs:
lint-and-test:
runs-on: ubuntu-latest
timeout-minutes: 50
steps:
- name: 🛀🏼 Maximize build space
uses: AdityaGarg8/remove-unwanted-software@v3
with:
remove-android: 'true'
remove-dotnet: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
- name: Checkout project
uses: actions/checkout@v4
- name: ⚙️ Install rust compilation dependencies
run: |
sudo apt-get update
sudo apt-get -y install libudev-dev
- name: 👨🔧 Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: 👩🔧 Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: 🦿 Install Rust tookchain
uses: dtolnay/rust-toolchain@1.73.0
with:
components: rustfmt, clippy
- name: 🫙 Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4
- run: pnpm install
- run: pnpm lint
- run: cargo test --release -- --nocapture