Skip to content

Commit 1659caa

Browse files
authored
Merge pull request #2 from jost-s/build/upgrade-to-holochain-0.2
build!: upgrade to holochain 0.2
2 parents 1244054 + fc64456 commit 1659caa

File tree

14 files changed

+1138
-227
lines changed

14 files changed

+1138
-227
lines changed

.github/workflows/test.yaml

Lines changed: 56 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,68 @@
1-
name: "test"
1+
name: CI
2+
23
on:
3-
# Trigger the workflow on push or pull request,
4-
# but only for the main branch
5-
push:
6-
branches: [ main, develop ]
74
pull_request:
8-
branches: [ main, develop ]
5+
push:
6+
branches:
7+
- "develop"
8+
- "main"
9+
10+
concurrency:
11+
group: ${{ github.ref_name }}
12+
cancel-in-progress: true
913

1014
jobs:
11-
testbuild:
12-
runs-on: ubuntu-latest
15+
build-and-test:
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
os: [ubuntu-latest, macos-latest]
20+
fail-fast: false
21+
1322
steps:
14-
- uses: actions/checkout@v2
23+
- name: Checkout code
24+
uses: actions/checkout@v3
1525

1626
- name: Install nix
17-
uses: cachix/install-nix-action@v18
18-
with:
19-
install_url: https://releases.nixos.org/nix/nix-2.12.0/install
20-
extra_nix_config: |
21-
experimental-features = flakes nix-command
27+
uses: cachix/install-nix-action@v22
2228

23-
- uses: cachix/cachix-action@v10
29+
- name: Set up cachix
30+
uses: cachix/cachix-action@v12
2431
with:
2532
name: holochain-ci
2633

27-
- name: Install and test
28-
run: |
29-
nix develop --command bash -c "npm i && npm t"
34+
- name: Restore cargo and build from cache
35+
uses: actions/cache/restore@v3
36+
with:
37+
path: |
38+
.cargo
39+
target
40+
key: ${{ runner.os }}-build-${{ hashFiles('Cargo.lock') }}
41+
restore-keys: |
42+
${{ runner.os }}-build-
43+
44+
- name: Install nix packages
45+
run: nix develop -c $SHELL -c "echo Nix packages installed"
46+
47+
- name: Install JS packages
48+
run: nix develop -c $SHELL -c "npm ci"
49+
50+
- name: Clippy
51+
run: nix develop -c $SHELL -c "cargo clippy"
52+
53+
- name: Check rust formatting
54+
run: nix develop -c $SHELL -c "cargo fmt"
55+
56+
- name: Build Happ
57+
run: nix develop -c $SHELL -c "npm run build:happ"
58+
59+
- name: Save cargo and build to cache
60+
uses: actions/cache/save@v3
61+
with:
62+
path: |
63+
.cargo
64+
target
65+
key: ${{ runner.os }}-build-${{ hashFiles('Cargo.lock') }}
3066

67+
- name: Test with tryorama
68+
run: nix develop -c $SHELL -c "npm test"

0 commit comments

Comments
 (0)