0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 02:10:44 -05:00

Update workflows to use Bun

Updates the test and lint workflows to use the `oven/bun` container and run the commands with `bun`.
This commit is contained in:
Refringe 2024-12-21 20:11:06 -05:00
parent 206dee78f4
commit 615e641270
Signed by: Refringe
SSH Key Fingerprint: SHA256:t865XsQpfTeqPRBMN2G6+N8wlDjkgUCZF3WGW6O9N/k
2 changed files with 36 additions and 22 deletions

View File

@ -9,24 +9,31 @@ on:
jobs:
biome:
runs-on: ubuntu-latest
container:
image: oven/bun:latest
steps:
- name: Install Git and LFS
run: |
apt-get update
apt-get install -y git git-lfs
git --version
git lfs --version
- uses: actions/checkout@v4
with:
lfs: false
- name: Mark Workspace as Safe
run: git config --system --add safe.directory "$PWD"
- name: Checkout LFS
run: git lfs pull
working-directory: ${{ github.workspace }}
- uses: actions/setup-node@v4
with:
node-version-file: "project/.nvmrc"
cache: "npm"
cache-dependency-path: "project/package.json"
- name: Install NPM Dependencies
run: npm install
working-directory: ./project
- name: Install Dependencies
run: bun install
working-directory: ${{ github.workspace }}/project
- name: Run Linter
run: npm run lint
working-directory: ./project
run: bun run lint
working-directory: ${{ github.workspace }}/project

View File

@ -9,24 +9,31 @@ on:
jobs:
vitest:
runs-on: ubuntu-latest
container:
image: oven/bun:latest
steps:
- name: Install Git and LFS
run: |
apt-get update
apt-get install -y git git-lfs
git --version
git lfs --version
- uses: actions/checkout@v4
with:
lfs: false
- name: Mark Workspace as Safe
run: git config --system --add safe.directory "$PWD"
- name: Checkout LFS
run: git lfs pull
working-directory: ${{ github.workspace }}
- uses: actions/setup-node@v4
with:
node-version-file: "project/.nvmrc"
cache: "npm"
cache-dependency-path: "project/package.json"
- name: Install NPM Dependencies
run: npm install
working-directory: ./project
- name: Install Dependencies
run: bun install
working-directory: ${{ github.workspace }}/project
- name: Run Tests
run: npm run test
working-directory: ./project
run: bun run test
working-directory: ${{ github.workspace }}/project