mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-03 08:00:32 +00:00
bb733e72c8
Docker Image CI / build-and-push-image (push) Has been cancelled
Maintain Release Merge PR / update-release-pr (push) Has been cancelled
Notify HeyPuter / notify (push) Has been cancelled
release-please / release-please (push) Has been cancelled
test / test-backend (24.x) (push) Has been cancelled
test / API tests (node env, api-test) (24.x) (push) Has been cancelled
test / puterjs (node env, vitest) (24.x) (push) Has been cancelled
* fix: websocket syncing on redis * fix: websocket syncing on redis
95 lines
2.2 KiB
YAML
95 lines
2.2 KiB
YAML
name: test
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
paths-ignore:
|
|
- "src/docs/**"
|
|
pull_request:
|
|
branches: ["main"]
|
|
paths-ignore:
|
|
- "src/docs/**"
|
|
|
|
jobs:
|
|
test-backend:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [24.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 (with coverage)
|
|
env:
|
|
NODE_OPTIONS: "--max-old-space-size=4096"
|
|
run: |
|
|
npm ci
|
|
npm run build
|
|
npm run test:backend -- --coverage --coverage.reporter=json --coverage.reporter=json-summary --coverage.reporter=lcov
|
|
|
|
- name: Upload backend coverage report
|
|
if: ${{ always() && hashFiles('coverage/**/coverage-summary.json') != '' }}
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: backend-coverage-${{ matrix.node-version }}
|
|
path: coverage
|
|
retention-days: 5
|
|
|
|
api-test:
|
|
name: API tests (node env, api-test)
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [24.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: 10
|
|
|
|
strategy:
|
|
matrix:
|
|
node-version: [24.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
|