mirror of
https://github.com/Jellify-Music/App.git
synced 2026-01-06 11:00:09 -06:00
* FIXING BUN JEST * Update Jest configuration and add nitro-fetch mocks for improved testing
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
name: Run Jest Unit Tests
|
|
on:
|
|
push:
|
|
branches-ignore:
|
|
- "main"
|
|
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
run-jest-test-suite:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 🛒 Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: 🖥 Setup Bun 1.3.2
|
|
uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: 1.3.2
|
|
|
|
- name: 📦 Cache dependencies
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.bun/install/cache
|
|
node_modules
|
|
.jest-cache
|
|
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-bun-
|
|
|
|
- name: 💬 Echo package.json version to Github ENV
|
|
run: echo VERSION_NUMBER=$(bun -p "require('./package.json').version") >> $GITHUB_ENV
|
|
|
|
- name: 🤖 Run yarn init-android
|
|
run: bun i
|
|
|
|
- name: 🔍 Run yarn tsc
|
|
run: bun tsc
|
|
|
|
- name: 🧪 Run yarn test
|
|
run: CI=true bun run test
|
|
|
|
- name: 🦋 Check Styling
|
|
run: bun run format:check
|