File: run-tests.yml

package info (click to toggle)
pg-auto-failover 2.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,368 kB
  • sloc: ansic: 58,369; python: 5,515; sql: 3,177; makefile: 629; sh: 35
file content (77 lines) | stat: -rw-r--r-- 1,765 bytes parent folder | download | duplicates (2)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Run Tests

on:
  push:
    branches:
    - main
  pull_request:
    branches:
    - main

  workflow_dispatch:

jobs:
  run_tests:
    name: Run test
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        PGVERSION:
          - 13
          - 14
          - 15
          - 16
          - 17
        TEST:
          - multi
          - single
          - monitor
          - ssl
          - citus
        include:
          - PGVERSION: 14
            TEST: tablespaces
          - PGVERSION: 14
            TEST: linting
    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      - name: Set environment variables
        run: |
            echo "PGVERSION=${{ matrix.PGVERSION }}" >> $GITHUB_ENV
            echo "TEST=${{ matrix.TEST }}" >> $GITHUB_ENV
            echo "LINTING=${{ matrix.LINTING }}" >> $GITHUB_ENV
            echo "TRAVIS_BUILD_DIR=$(pwd)" >> $GITHUB_ENV

      - name: Clone and install linting tools
        if: ${{ env.TEST == 'linting' }}
        run: |
          sudo apt-get install python3-pip
          pip3 install --user black
          black --version
          gcc --version
          # Install uncrustify the Citus way
          make -C ci -f tools.mk tools

      - name: Check code formatting and banned function
        if: ${{ env.TEST == 'linting' }}
        run: |
          make lint

      - name: Build documentation
        if: ${{ env.TEST == 'linting' }}
        run: |
          make build-docs

      - name: Build Docker Test Image
        if: ${{ env.TEST != 'linting' }}
        run: |
          make build-test-image

      - name: Run Test
        if: ${{ env.TEST != 'linting' }}
        timeout-minutes: 15
        run: |
          make ci-test