Skip to content

feat(backend): set user token #236

feat(backend): set user token

feat(backend): set user token #236

Workflow file for this run

name: Backend Tests
on:
pull_request:
paths:
- # Scripts, GitHub actions that contain 'backend' in their path.
'**/*backend*'
- # The backend source code
'src/backend/**'
- 'src/shared/**'
- # Rust files such as Cargo.lock, Cargo.toml and rust-toolchain.toml
'**/Cargo*'
- '**/*rust*'
- # The dockerfile used in this CI run, and the scripts it COPY's.
'Dockerfile'
- 'docker/**'
workflow_dispatch:
jobs:
docker-build-base:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Base Docker Image
uses: ./.github/actions/docker-build-base
docker-build:
runs-on: ubuntu-20.04
needs: docker-build-base
strategy:
matrix:
include:
- name: backend.wasm.gz
target: scratch_backend
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build canister WASM
uses: ./.github/actions/docker-build-backend
with:
name: ${{ matrix.name }}
target: ${{ matrix.target }}
tests:
runs-on: ubuntu-20.04
needs: [ 'docker-build' ]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-backend-tests-${{ hashFiles('Cargo.lock', 'rust-toolchain.toml') }}
- name: Download backend.wasm.gz
uses: actions/download-artifact@v4
with:
name: backend.wasm.gz
path: .
- name: "Run backend tests"
working-directory: .
run: ./scripts/test.backend.sh
may-merge:
needs: [ 'tests' ]
runs-on: ubuntu-20.04
steps:
- name: Cleared for merging
run: echo OK