mirror of
https://github.com/HeyPuter/puter.git
synced 2026-01-05 20:50:22 -06:00
* fix: backend tests breaking with permision * test: cleanup running tests * chore: config.d.ts
83 lines
1.7 KiB
YAML
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
|