-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (46 loc) · 1.46 KB
/
ci.yml
File metadata and controls
58 lines (46 loc) · 1.46 KB
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
name: CI
on:
push:
branches: [main, dev, release/*, feature/*]
pull_request:
branches: [main, dev, release/*]
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
run: |
rm -rf .git
git init .
git remote add origin "https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git"
git fetch --depth=1 origin "${{ github.sha }}"
git checkout --detach FETCH_HEAD
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Install browser test dependencies
run: |
npm ci
npx playwright install --with-deps chromium
- name: Verify assets are up to date
run: |
make clean
make assets
git diff --exit-code static/sf/sf.css static/sf/sf.js static/sf/sf.*.css static/sf/sf.*.js
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --all-targets -- -D warnings
- name: Build
run: cargo build
- name: Run tests
run: |
cargo test
node --test tests/*.test.js
node tests/demo-browser-check.js
- name: Verify package contents
run: ./scripts/verify-package.sh