fix: reduce verbose test output from poll errors and PG notices #248
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/refs/heads/master/src/schemas/json/github-workflow.json | |
| name: Release Action | |
| on: | |
| workflow_dispatch: | |
| push: | |
| jobs: | |
| release: | |
| runs-on: ubuntu-24.04 | |
| if: ${{ github.repository_owner == 'query-doctor' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Install Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Export version | |
| run: | | |
| echo "VERSION=$(jq -r '.version' package.json)" >> $GITHUB_ENV | |
| - name: Typecheck | |
| run: npx tsc --noEmit | |
| - name: Install PostgreSQL 17 client | |
| run: | | |
| sudo apt install -y postgresql-common | |
| sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y | |
| sudo apt update | |
| sudo apt install -y postgresql-client-17 | |
| - name: Run tests | |
| run: npx vitest run | |
| env: | |
| PG_DUMP_BINARY: /usr/lib/postgresql/17/bin/pg_dump | |
| PG_RESTORE_BINARY: /usr/lib/postgresql/17/bin/pg_restore | |
| - name: Upload files to release | |
| uses: softprops/action-gh-release@v2 | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| with: | |
| tag_name: v${{ env.VERSION }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |