forked from holochain/scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (64 loc) · 2.02 KB
/
test.yaml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: "test"
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches: [ develop, develop-0.1, develop-0.2, develop-0.3 ]
pull_request:
branches: [ develop, develop-0.1, develop-0.2, develop-0.3 ]
jobs:
test_fmt_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Unittests
run: cargo test --no-fail-fast
- name: Format Rust
run: cargo fmt --all --check
- name : Lint Rust
run: cargo clippy --all-targets -- -D warnings
testbuild:
runs-on: ubuntu-latest
strategy:
matrix:
template: [ svelte, vue, lit, react, vanilla ]
steps:
- uses: actions/checkout@v4
- name: Extend space
uses: ./.github/actions/extend-space
- name: Install nix
uses: cachix/install-nix-action@v27
with:
install_url: https://releases.nixos.org/nix/nix-2.23.2/install
extra_nix_config: |
experimental-features = flakes nix-command
- uses: cachix/cachix-action@v15
with:
name: holochain-ci
- name: Build and test
run: |
cd $GITHUB_WORKSPACE
nix develop --override-input "versions/scaffolding" . .#ci --command ./run_test.sh -t ${{ matrix.template }}
testbuild_by_scope:
runs-on: ubuntu-latest
strategy:
matrix:
scope:
- hello_world
- holo_integration
steps:
- uses: actions/checkout@v4
- name: Extend space
uses: ./.github/actions/extend-space
- name: Install nix
uses: cachix/install-nix-action@v27
with:
install_url: https://releases.nixos.org/nix/nix-2.23.2/install
- uses: cachix/cachix-action@v15
with:
name: holochain-ci
- name: Build and test
run: |
cd $GITHUB_WORKSPACE
nix develop --override-input "versions/scaffolding" . .#ci --command ./run_test.sh -s ${{ matrix.scope }}