chore: upgrade to holochain v0.4.0-dev.18 #132
This file contains hidden or 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: Main | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*.*.*" | |
jobs: | |
build-wasm: | |
name: Build DNA | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install nix | |
uses: cachix/install-nix-action@v27 | |
with: | |
install_url: https://releases.nixos.org/nix/nix-2.23.3/install | |
extra_nix_config: | | |
experimental-features = flakes nix-command | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: holochain-ci | |
- name: Set up Rust cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: holoom-dna-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build DNA | |
run: | | |
nix develop --command \ | |
npm run build:dna | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: happ_workdir | |
path: workdir | |
retention-days: 1 | |
build-packages: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.12.2" | |
cache: "npm" | |
- name: Setup node dependency cache | |
uses: actions/cache@v4 | |
with: | |
path: "**/node_modules" | |
key: node_modules-${{ hashFiles('**/package-lock.json')}} | |
- run: npm i | |
- run: npm run -w @holoom/types build | |
- run: npm run -w @holoom/client build | |
- run: npm run -w @holoom/authority build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: types-dist | |
path: packages/types/dist | |
retention-days: 1 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: client-dist | |
path: packages/client/dist | |
retention-days: 1 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: authority-dist | |
path: packages/authority/dist | |
retention-days: 1 | |
tryorama-tests: | |
name: Tryorama Tests | |
runs-on: ubuntu-20.04 | |
needs: | |
- build-wasm | |
- build-packages | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install nix | |
uses: cachix/install-nix-action@v27 | |
with: | |
install_url: https://releases.nixos.org/nix/nix-2.23.3/install | |
extra_nix_config: | | |
experimental-features = flakes nix-command | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: holochain-ci | |
- run: rm -rf workdir | |
- name: Download DNA | |
uses: actions/download-artifact@v4 | |
with: | |
name: happ_workdir | |
path: workdir | |
- uses: actions/download-artifact@v4 | |
with: | |
name: types-dist | |
path: packages/types/dist | |
- uses: actions/download-artifact@v4 | |
with: | |
name: client-dist | |
path: packages/client/dist | |
- uses: actions/download-artifact@v4 | |
with: | |
name: authority-dist | |
path: packages/authority/dist | |
- name: Setup node dependency cache | |
uses: actions/cache@v4 | |
with: | |
path: "**/node_modules" | |
key: node_modules-${{ hashFiles('**/package-lock.json')}} | |
- run: | | |
nix develop --command bash -c \ | |
"npm i -w @holoom/tryorama && npm test -w @holoom/tryorama" | |
dna-tests: | |
name: DNA Tests | |
runs-on: ubuntu-20.04 | |
needs: | |
- build-wasm | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/free-disk-space@main | |
- name: Install nix | |
uses: cachix/install-nix-action@v27 | |
with: | |
install_url: https://releases.nixos.org/nix/nix-2.23.3/install | |
extra_nix_config: | | |
experimental-features = flakes nix-command | |
- uses: cachix/cachix-action@v10 | |
with: | |
name: holochain-ci | |
- name: Set up Rust cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: holoom-dna-tests-${{ hashFiles('**/Cargo.lock') }} | |
- run: rm -rf workdir | |
- name: Download DNA | |
uses: actions/download-artifact@v4 | |
with: | |
name: happ_workdir | |
path: workdir | |
- name: Build and run tests | |
run: | | |
nix develop --command \ | |
cargo nextest run -j 1 | |
e2e: | |
name: Build and run end-to-end tests | |
needs: | |
- build-wasm | |
- build-packages | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout the repo | |
uses: actions/checkout@v4 | |
- name: Download happ_workdir | |
uses: actions/download-artifact@v4 | |
with: | |
name: happ_workdir | |
path: docker/misc_hc/happ_workdir | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.12.2" | |
cache: "npm" | |
- name: Setup node dependency cache | |
uses: actions/cache@v4 | |
with: | |
path: "**/node_modules" | |
key: node_modules-${{ hashFiles('**/package-lock.json')}} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: types-dist | |
path: packages/types/dist | |
- uses: actions/download-artifact@v4 | |
with: | |
name: client-dist | |
path: packages/client/dist | |
- uses: actions/download-artifact@v4 | |
with: | |
name: authority-dist | |
path: packages/authority/dist | |
- run: npm i | |
- run: npx puppeteer browsers install chrome | |
- run: npm run build:mock-oracle | |
- name: Build images | |
run: | | |
docker build --target local-services -t holoom/local-services docker/misc_hc | |
docker build --target authority-agent-sandbox -t holoom/authority-agent-sandbox docker/misc_hc | |
docker build --target holo-dev-server -t holoom/holo-dev-server docker/misc_hc | |
docker build -t holoom/mock-auth docker/mock-auth | |
docker build \ | |
-t holoom/external-id-attestor \ | |
-f docker/external-id-attestor/Dockerfile \ | |
packages | |
docker build \ | |
-t holoom/mock-oracle \ | |
-f docker/mock-oracle/Dockerfile \ | |
packages/mock-oracle | |
docker build \ | |
-t holoom/evm-bytes-signer \ | |
-f docker/evm-bytes-signer/Dockerfile \ | |
packages | |
docker build \ | |
-t holoom/query \ | |
-f docker/query/Dockerfile \ | |
packages | |
- name: Start frontend in background | |
run: npm run dev -w @holoom/e2e & | |
- name: Run e2e tests | |
run: npm run test -w @holoom/e2e | |
release: | |
name: Publish release artefacts | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: | |
- e2e | |
- dna-tests | |
- tryorama-tests | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download happ_workdir | |
uses: actions/download-artifact@v4 | |
with: | |
name: happ_workdir | |
path: happ_workdir | |
- name: Move DNA | |
run: mv happ_workdir/holoom.dna ./holoom.dna | |
- name: Download types dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: types-dist | |
path: packages/types/dist | |
- name: Download client dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: client-dist | |
path: packages/client/dist | |
- name: Download external-id-attestor dist | |
uses: actions/download-artifact@v4 | |
with: | |
name: authority-dist | |
path: packages/authority/dist | |
- name: Release binaries | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
holoom.dna | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20.12.2" | |
registry-url: "https://registry.npmjs.org" | |
- name: Publish types to npm | |
run: npm publish --access public -w @holoom/types | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish client to npm | |
run: npm publish --access public -w @holoom/client | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish authority to npm | |
run: npm publish --access public -w @holoom/authority | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |