Skip to content

feat(topbar): minor UI changes SYNTH-311 #4130

feat(topbar): minor UI changes SYNTH-311

feat(topbar): minor UI changes SYNTH-311 #4130

name: Fission - Unit Test
env:
BUN_VERSION: "1.3.14"
on:
workflow_dispatch: {}
push:
branches: [prod, dev]
pull_request:
branches: [prod, dev]
jobs:
runUnitTests:
name: Playwright Unit Tests
container:
image: mcr.microsoft.com/playwright:v1.61.0-noble
runs-on: ubuntu-latest
defaults:
run:
working-directory: "fission"
steps:
- name: Checkout Code
uses: actions/checkout@v7
- name: Install System Dependencies
run: |
apt-get update
apt-get install -y git-lfs unzip
- name: Bun Setup
uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Cache Unzipped Synthesis Assets
id: cache-assets
uses: actions/cache@v6
with:
path: fission/public/Downloadables
key: ${{ runner.os }}-assets-${{hashFiles('fission/public/assetpack.zip')}}
- name: Download Synthesis assetpack if not cached
if: steps.cache-assets.outputs.cache-hit != 'true'
run: |
cd ..
git config --global --add safe.directory `pwd`
git lfs pull
cd fission
unzip -o public/assetpack.zip -d public/ || echo
- name: Cache Node Dependencies
uses: actions/cache@v6
with:
key: "${{runner.os}}-npm-fission-${{hashFiles('fission/bun.lock')}}"
path: "fission/node_modules"
restore-keys: |
${{runner.os}}-npm-fission-
${{runner.os}}-npm
- name: Install Dependencies
run: bun install --frozen-lockfile
- name: Run Tests
run: |
HOME=/root bun run test 2>&1 | tee output.txt
grep -q "GH ACTIONS VITEST PASSED" output.txt
runAssetpackTests:
name: Assetpack Tests
needs: runUnitTests
container:
image: mcr.microsoft.com/playwright:v1.61.0-noble
runs-on: ubuntu-latest
defaults:
run:
working-directory: "fission"
steps:
- name: Checkout Code
uses: actions/checkout@v7
- name: Install System Dependencies
run: |
apt-get update
apt-get install -y unzip
- name: Bun Setup
uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Cache Unzipped Synthesis Assets
id: cache-assets
uses: actions/cache@v6
with:
path: fission/public/Downloadables
key: ${{ runner.os }}-assets-${{hashFiles('fission/public/assetpack.zip')}}
- name: Cache Node Dependencies
uses: actions/cache@v6
with:
key: "${{runner.os}}-npm-fission-${{hashFiles('fission/bun.lock')}}"
path: "fission/node_modules"
restore-keys: |
${{runner.os}}-npm-fission-
${{runner.os}}-npm
- name: Run Assetpack Tests
run: |
HOME=/root bun run test src/test/mirabuf/DefaultAssets.test.ts 2>&1 | tee output.txt
grep -q "GH ACTIONS VITEST PASSED" output.txt
env:
VITE_RUN_ASSETPACK_TEST: true