-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (46 loc) · 1.18 KB
/
rust.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
name: Rust
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: oven-sh/setup-bun@v1
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
with:
key: cargo-build-debug
- name: Format Check
run: cargo fmt --all -- --check
- name: Build Tests
run: cargo build --tests --bins
- name: Lint
run: cargo lint
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: latest
- name: Build and Validate
run: ./target/debug/samlang-cli e2e
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy, llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
with:
key: cargo-test
- name: Run Tests
run: cargo tc