Skip to content

Commit

Permalink
Merge pull request #2 from jost-s/build/upgrade-to-holochain-0.2
Browse files Browse the repository at this point in the history
build!: upgrade to holochain 0.2
  • Loading branch information
mattyg authored Jul 26, 2023
2 parents 1244054 + fc64456 commit 1659caa
Show file tree
Hide file tree
Showing 14 changed files with 1,138 additions and 227 deletions.
74 changes: 56 additions & 18 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,68 @@
name: "test"
name: CI

on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
push:
branches:
- "develop"
- "main"

concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: true

jobs:
testbuild:
runs-on: ubuntu-latest
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
fail-fast: false

steps:
- uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v3

- name: Install nix
uses: cachix/install-nix-action@v18
with:
install_url: https://releases.nixos.org/nix/nix-2.12.0/install
extra_nix_config: |
experimental-features = flakes nix-command
uses: cachix/install-nix-action@v22

- uses: cachix/cachix-action@v10
- name: Set up cachix
uses: cachix/cachix-action@v12
with:
name: holochain-ci

- name: Install and test
run: |
nix develop --command bash -c "npm i && npm t"
- name: Restore cargo and build from cache
uses: actions/cache/restore@v3
with:
path: |
.cargo
target
key: ${{ runner.os }}-build-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-build-
- name: Install nix packages
run: nix develop -c $SHELL -c "echo Nix packages installed"

- name: Install JS packages
run: nix develop -c $SHELL -c "npm ci"

- name: Clippy
run: nix develop -c $SHELL -c "cargo clippy"

- name: Check rust formatting
run: nix develop -c $SHELL -c "cargo fmt"

- name: Build Happ
run: nix develop -c $SHELL -c "npm run build:happ"

- name: Save cargo and build to cache
uses: actions/cache/save@v3
with:
path: |
.cargo
target
key: ${{ runner.os }}-build-${{ hashFiles('Cargo.lock') }}

- name: Test with tryorama
run: nix develop -c $SHELL -c "npm test"
Loading

0 comments on commit 1659caa

Please sign in to comment.