-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (48 loc) · 1.62 KB
/
test.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: Test
on: [push, pull_request]
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions/checkout@master
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check
test:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest] # todo: add 'windows-latest'
rust: [stable]
experimental: [false]
# Note: We're no longer reliant on nightly, so we can remove this.
# Keeping it here for future reference.
#
# # include:
# # # Test on stable -- we expect this to fail, but we want to know when it starts working!
# # - rust: stable
# # os: ubuntu-latest
# # experimental: true
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- uses: actions/checkout@master
- name: Install npm packages for examples & tests
run: |
(cd ./crates/vite-rs/test_projects && npm ci)
(cd ./crates/vite-rs/examples/vite-project-folder && npm ci)
- name: Run tests # note: this step also compiles examples, but does not run them.
run: |
cargo test
cargo test --release
- name: Run examples
run: |
cargo run --example basic_usage
cargo run --example basic_usage --release
cargo run --example custom_ctrl_c_handler
cargo run --example custom_ctrl_c_handler --release