Files
puter/.github/workflows/test.yml
Daniel Salazar 45fb5c32b1 chore: various test related changes (#2069)
* fix: backend tests breaking with permision

* test: cleanup running tests

* chore: config.d.ts
2025-12-01 01:14:44 -08:00

83 lines
1.7 KiB
YAML

name: test
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
test-backend:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Backend Tests
run: |
rm package-lock.json
npm install -g npm@latest
npm install
npm run build
npm run test:backend
api-test:
name: API tests (node env, api-test)
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: API Test
run: |
pip install -r ./tests/ci/requirements.txt
./tests/ci/api-test.py
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: (api-test) server-logs
path: /tmp/backend.log
retention-days: 3
vitest:
name: puterjs (node env, vitest)
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Vitest Test
run: |
pip install -r ./tests/ci/requirements.txt
./tests/ci/vitest.py