Skip to content

feat: performance metrics #456

feat: performance metrics

feat: performance metrics #456

Workflow file for this run

name: Tests
on:
pull_request:
paths:
- 'src/satellite/**'
- 'src/orbiter/**'
- 'src/console/**'
- 'src/mission_control/**'
- 'src/libs/**'
- 'src/tests/**'
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: satellite
wasm: satellite.wasm.gz
target: scratch_satellite
- name: orbiter
wasm: orbiter.wasm.gz
target: scratch_orbiter
- name: console
wasm: console.wasm.gz
target: scratch_console
- name: mission_control
wasm: mission_control.wasm.gz
target: scratch_mission_control
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up docker buildx
uses: docker/setup-buildx-action@v3
- name: Build ${{ matrix.name }}
uses: docker/build-push-action@v5
with:
file: Dockerfile
cache-from: type=gha,scope=cached-stage
# Exports the artefacts from the final stage
outputs: ./out
target: ${{ matrix.target }}
- run: mv out/${{ matrix.wasm }} ${{ matrix.wasm }}
- name: Upload ${{ matrix.name }}
uses: actions/upload-artifact@v4
with:
# name is the name used to display and retrieve the artifact
name: ${{ matrix.wasm }}
# path is the name used as the file to upload and the name of the
# downloaded file
path: ./${{ matrix.wasm }}
tests:
runs-on: ubuntu-latest
needs: docker-build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download satellite.wasm.gz
uses: actions/download-artifact@v4
with:
name: satellite.wasm.gz
path: .
- name: Download orbiter.wasm.gz
uses: actions/download-artifact@v4
with:
name: orbiter.wasm.gz
path: .
- name: Download console.wasm.gz
uses: actions/download-artifact@v4
with:
name: console.wasm.gz
path: .
- name: Download mission_control.wasm.gz
uses: actions/download-artifact@v4
with:
name: mission_control.wasm.gz
path: .
- name: Install dependencies
run: npm ci
- name: Tests
run: npm run test
may-merge:
needs: ['tests']
runs-on: ubuntu-latest
steps:
- name: Cleared for merging
run: echo OK