Skip to content

Feat/cleanup sns tokens for anonymous users #718

Feat/cleanup sns tokens for anonymous users

Feat/cleanup sns tokens for anonymous users #718

name: Canisters test suite run on any push except main
on:
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Run canister test suite
runs-on: depot-ubuntu-22.04-32
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Cache install Nix packages
uses: rikhuijzer/cache-install@v1.1.4
with:
key: nix-${{ hashFiles('default.nix') }}
- name: Cache rust dependencies, build output and DFX build cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
.dfx/
key: rust-test-${{ hashFiles('**/Cargo.lock') }}
- name: Import DFX identity
run: |
touch actions_identity.pem
echo "${{ secrets.CANISTER_CONTROLLER_SECRET_KEY }}" > actions_identity.pem
nix-shell --run "dfx identity import --disable-encryption actions actions_identity.pem"
rm actions_identity.pem
nix-shell --run "dfx identity use actions"
- name: Start local replica
run: nix-shell --run "dfx start --background"
- name: Provision local canister IDs for the canisters
run: |
nix-shell --run "dfx canister create --no-wallet individual_user_template"
nix-shell --run "dfx canister create --no-wallet post_cache"
nix-shell --run "dfx canister create --no-wallet user_index"
nix-shell --run "dfx canister create --no-wallet platform_orchestrator"
- name: Stop local replica
run: nix-shell --run "dfx stop"
- name: Build platform_orchestrator canister
run: |
nix-shell --run "dfx build platform_orchestrator"
gzip -f -1 ./target/wasm32-unknown-unknown/release/platform_orchestrator.wasm
- name: Build individual_user_template canister
run: |
nix-shell --run "dfx build individual_user_template"
gzip -f -1 ./target/wasm32-unknown-unknown/release/individual_user_template.wasm
- name: Build user_index canister
run: |
nix-shell --run "dfx build user_index"
gzip -f -1 ./target/wasm32-unknown-unknown/release/user_index.wasm
- name: Build post_cache canister
run: |
nix-shell --run "dfx build post_cache"
gzip -f -1 ./target/wasm32-unknown-unknown/release/post_cache.wasm
- name: Run canister test suite
env:
POCKET_IC_BIN: ${{ github.workspace }}/pocket-ic
run: nix-shell --run "cargo test"