Skip to content

ci: add testing workflow #23

ci: add testing workflow

ci: add testing workflow #23

Workflow file for this run

name: Run tests
on: [push, pull_request]
defaults:
run:
shell: bash
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pgversion: ['17', '16', '15', '14', '13', '12', '11', '10', '9.6']
steps:
- name: Setup repository
uses: actions/checkout@v4
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Setup environment
run: |
sudo apt-get install -y build-essential wget gdb lldb libpq5
npm install --save-dev
npm install
- name: Build extension
run: npm run compile
- name: Setup sources
run: ./src/test/setup.sh -j 4 --pg-version=${{ matrix.pgversion }}
- name: Run tests
run: ./src/test/test.sh --no-gui --pg-versions=${{ matrix.pgversion }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
name: postgresql-logs-${{ matrix.pgversion }}
retention-days: 3
path: |
pgsrc/${{ matrix.pgversion }}/data/postgresql.log
src/test/log