Fix up types & tests #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- "develop" | |
- "main" | |
- "feature/trustgraph" | |
concurrency: | |
group: ${{ github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
build-and-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
fail-fast: false | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install nix | |
uses: cachix/install-nix-action@v20 | |
with: | |
extra_nix_config: | | |
substituters = https://cache.nixos.org https://holochain.cachix.org https://holochain-ci.cachix.org | |
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= holochain.cachix.org-1:fWOoSTrRQ8XipZim7a8LDqFAE8aqcGnG4E7G8NAJlgY= holochain-ci.cachix.org-1:5IUSkZc0aoRS53rfkvH9Kid40NpyjwCMCzwRTXy+QN8= | |
nix.settings.auto-optimise-store = true; | |
- name: Inspect nix.conf | |
run: cat ~/.config/nix/nix.conf || true | |
- name: Set up cachix | |
uses: cachix/cachix-action@v12 | |
with: | |
name: holochain | |
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" # token exists in trustgraph org | |
- name: Cache Cargo and Rust Build | |
uses: actions/cache@v2 | |
if: always() # build artifacts are correct even if job fails | |
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: Build Happ | |
run: nix develop -c $SHELL -c "npm run build:happ" | |
- name: Test with sweettest | |
run: nix develop -c $SHELL -c "npm run test:sweet" | |
- name: Test with tryorama | |
run: nix develop -c $SHELL -c "npm test" | |
- name: Clippy | |
run: nix develop -c $SHELL -c "npm run cargo:clippy" | |
- name: Check rust formatting | |
run: nix develop -c $SHELL -c "npm run cargo:fmt:check" |