refactor: test utils module and pocketic name #19
Workflow file for this run
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: Backend tests | |
on: | |
pull_request: | |
paths: | |
- 'src/backend/**' | |
- 'src/shared/**' | |
jobs: | |
docker-build-base: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build Base Docker Image | |
uses: ./.github/actions/docker-build-base | |
docker-build: | |
runs-on: ubuntu-latest | |
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-latest | |
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-latest | |
steps: | |
- name: Cleared for merging | |
run: echo OK |