diff --git a/.github/workflows/backend-test.yml b/.github/workflows/backend-test.yml new file mode 100644 index 00000000..689a9c7a --- /dev/null +++ b/.github/workflows/backend-test.yml @@ -0,0 +1,29 @@ +name: Backend Tests +on: + pull_request: + push: + branches: [main] +jobs: + test: + runs-on: self-hosted + defaults: + run: + working-directory: backend + steps: + - uses: actions/checkout@v5 + - uses: pnpm/action-setup@v6 + with: + package_json_file: backend/package.json + cache: true + cache_dependency_path: backend/pnpm-lock.yaml + - uses: actions/setup-node@v5 + with: + node-version: 24 + - name: Install dependencies + run: pnpm install --frozen-lockfile + # The API tests start their own Postgres server with initdb and pg_ctl, + # which apt installs outside of PATH (see docs/deployment.md) + - name: Add PostgreSQL to PATH + run: echo "/usr/lib/postgresql/18/bin" >> "$GITHUB_PATH" + - name: Run tests + run: pnpm test