|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + test: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + strategy: |
| 9 | + matrix: |
| 10 | + pg-version: ['12', '13', '14', '15', '16', '17'] |
| 11 | + |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@v4 |
| 14 | + |
| 15 | + - name: Install Nix |
| 16 | + uses: cachix/install-nix-action@v30 |
| 17 | + with: |
| 18 | + nix_path: nixpkgs=channel:nixos-unstable |
| 19 | + |
| 20 | + - name: Use Cachix Cache |
| 21 | + uses: cachix/cachix-action@v10 |
| 22 | + with: |
| 23 | + name: nxpg |
| 24 | + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} |
| 25 | + |
| 26 | + - name: Build |
| 27 | + run: nix-shell --run "xpg -v ${{ matrix.pg-version }} build" |
| 28 | + |
| 29 | + - name: Run tests |
| 30 | + run: nix-shell --run "xpg -v ${{ matrix.pg-version }} test" |
| 31 | + |
| 32 | + - if: ${{ failure() }} |
| 33 | + run: | |
| 34 | + cat regression.out |
| 35 | + cat regression.diffs |
| 36 | +
|
| 37 | + loadtest: |
| 38 | + strategy: |
| 39 | + matrix: |
| 40 | + kind: ['csv_agg', 'postgrest'] |
| 41 | + name: Loadtest |
| 42 | + runs-on: ubuntu-24.04 |
| 43 | + steps: |
| 44 | + - uses: actions/checkout@v4 |
| 45 | + |
| 46 | + - name: Install Nix |
| 47 | + uses: cachix/install-nix-action@v30 |
| 48 | + with: |
| 49 | + nix_path: nixpkgs=channel:nixos-unstable |
| 50 | + |
| 51 | + - name: Use Cachix Cache |
| 52 | + uses: cachix/cachix-action@v10 |
| 53 | + with: |
| 54 | + name: nxpg |
| 55 | + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} |
| 56 | + |
| 57 | + - name: Run loadtest |
| 58 | + run: nix-shell --run "./bench/loadtest.sh ${{ matrix.kind }}" |
| 59 | + |
| 60 | + coverage: |
| 61 | + |
| 62 | + runs-on: ubuntu-latest |
| 63 | + |
| 64 | + strategy: |
| 65 | + matrix: |
| 66 | + pg-version: ['17'] |
| 67 | + |
| 68 | + steps: |
| 69 | + - uses: actions/checkout@v4 |
| 70 | + |
| 71 | + - name: Install Nix |
| 72 | + uses: cachix/install-nix-action@v30 |
| 73 | + with: |
| 74 | + nix_path: nixpkgs=channel:nixos-unstable |
| 75 | + |
| 76 | + - name: Use Cachix Cache |
| 77 | + uses: cachix/cachix-action@v10 |
| 78 | + with: |
| 79 | + name: nxpg |
| 80 | + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} |
| 81 | + |
| 82 | + - name: Run coverage |
| 83 | + run: nix-shell --run "xpg -v ${{ matrix.pg-version }} coverage" |
| 84 | + |
| 85 | + - name: Send coverage to Coveralls |
| 86 | + uses: coverallsapp/github-action@v2.3.6 |
| 87 | + with: |
| 88 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 89 | + files: ./build-${{ matrix.pg-version }}/coverage.info |
| 90 | + |
| 91 | + style: |
| 92 | + |
| 93 | + runs-on: ubuntu-latest |
| 94 | + |
| 95 | + steps: |
| 96 | + - uses: actions/checkout@v4 |
| 97 | + |
| 98 | + - name: Install Nix |
| 99 | + uses: cachix/install-nix-action@v30 |
| 100 | + with: |
| 101 | + nix_path: nixpkgs=channel:nixos-unstable |
| 102 | + |
| 103 | + - name: Use Cachix Cache |
| 104 | + uses: cachix/cachix-action@v10 |
| 105 | + with: |
| 106 | + name: nxpg |
| 107 | + authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} |
| 108 | + |
| 109 | + - name: Run style check |
| 110 | + run: nix-shell --run "pg_csv-style-check" |
0 commit comments