Skip to content

chore: rename to holoom and add readme (#9) #1

chore: rename to holoom and add readme (#9)

chore: rename to holoom and add readme (#9) #1

Workflow file for this run

name: End-to-End Tests
on:
pull_request:
push:
branches: main
jobs:
build-wasm:
name: Build DNA
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install nix
uses: cachix/install-nix-action@v18
with:
install_url: https://releases.nixos.org/nix/nix-2.13.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@v3
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
if: always()
with:
name: happ_workdir
path: workdir
overwrite: true
build-rocket:
name: Build Rocket
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- run: scripts/build_rocket_builder.sh
- name: Cargo build in docker
run: |
docker run -i \
-v "$(pwd):/proj" \
-w /proj rocket-builder bash -c \
"cargo build --release --package holoom_rocket_server"
- run: ls -l target
# - run: ls -l target/release
- run: whoami
- run: sudo chown -R $(whoami) target
- name: Ready artifact dir
run: mkdir artifact && mv target/release/holoom_rocket_server artifact/
- uses: actions/upload-artifact@v4
if: always()
with:
name: rocket
path: artifact
overwrite: true
dna-tests:
name: DNA Tests
runs-on: ubuntu-20.04
needs:
- build-wasm
steps:
- uses: actions/checkout@v3
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
- name: Install nix
uses: cachix/install-nix-action@v18
with:
install_url: https://releases.nixos.org/nix/nix-2.13.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@v3
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-rocket
runs-on: ubuntu-20.04
steps:
- name: Checkout the repo
uses: actions/checkout@v2
- name: Download happ_workdir
uses: actions/download-artifact@v4
with:
name: happ_workdir
path: docker/misc_hc/happ_workdir
- name: Download rocket binary
uses: actions/download-artifact@v4
with:
name: rocket
path: rocket-artifact
- run: mv rocket-artifact/holoom_rocket_server docker/rocket/
- 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/rocket docker/rocket
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18.19.1"
cache: "npm"
- name: Setup node dependency cache
uses: actions/cache@v2
with:
path: "**/node_modules"
key: node_modules-${{ hashFiles('**/package-lock.json')}}
- run: npm i
- run: npx puppeteer browsers install chrome
- run: npm run build:client
- name: Start frontend in background
run: npm run dev -w @holoom/e2e &
- name: Run e2e tests
run: npm run test -w @holoom/e2e