File: regression.yml

package info (click to toggle)
pgsentinel 1.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 244 kB
  • sloc: ansic: 1,757; sql: 97; makefile: 31; sh: 2
file content (49 lines) | stat: -rw-r--r-- 1,277 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: pgsentinel regression tests
on: [push, pull_request, workflow_dispatch]

jobs:
  test:
    strategy:
      matrix:
        pg:
          - 18
          - 17
          - 16
          - 15
          - 14
          - 13
          - 12
          - 11
          - 10

    name: PostgreSQL ${{ matrix.pg }}
    runs-on: ubuntu-latest
    container: pgxn/pgxn-tools
    steps:

      - name: Check out the repo
        uses: actions/checkout@v3

      - name: Start PostgreSQL ${{ matrix.pg }}
        run: pg-start ${{ matrix.pg }}

      - name: Build and install pgsentinel
        run: make && make install
        working-directory: src

      - name: Configure shared_preload_libraries and restart
        run: |
          config_file=$(psql --no-psqlrc -U postgres -Atqc 'SHOW config_file')
          echo "shared_preload_libraries = 'pg_stat_statements,pgsentinel'" >> "$config_file"
          echo "pgsentinel.db_name = 'contrib_regression'" >> "$config_file"
          pg_ctlcluster ${{ matrix.pg }} test restart

      - name: Run regression tests
        run: make installcheck
        working-directory: src
        env:
          DEB_BUILD_GNU_TYPE: 1

      - name: Show regression.diffs
        if: ${{ failure() }}
        run: cat src/regression.diffs || true