-
Notifications
You must be signed in to change notification settings - Fork 5
110 lines (84 loc) · 2.56 KB
/
ci.yaml
File metadata and controls
110 lines (84 loc) · 2.56 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
pg-version: ['12', '13', '14', '15', '16', '17']
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Use Cachix Cache
uses: cachix/cachix-action@v10
with:
name: nxpg
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Build
run: nix-shell --run "xpg -v ${{ matrix.pg-version }} build"
- name: Run tests
run: nix-shell --run "xpg -v ${{ matrix.pg-version }} test"
- if: ${{ failure() }}
run: |
cat regression.out
cat regression.diffs
loadtest:
strategy:
matrix:
kind: ['postgrest', 'csv_agg', 'csv_agg_options']
name: Loadtest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Use Cachix Cache
uses: cachix/cachix-action@v10
with:
name: nxpg
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Run loadtest
run: nix-shell --run "pg_csv-loadtest ${{ matrix.kind }}" >> "$GITHUB_STEP_SUMMARY"
coverage:
runs-on: ubuntu-latest
strategy:
matrix:
pg-version: ['17']
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Use Cachix Cache
uses: cachix/cachix-action@v10
with:
name: nxpg
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Run coverage
run: nix-shell --run "xpg -v ${{ matrix.pg-version }} coverage"
- name: Send coverage to Coveralls
uses: coverallsapp/github-action@v2.3.6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
files: ./build-${{ matrix.pg-version }}/coverage.info
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Use Cachix Cache
uses: cachix/cachix-action@v10
with:
name: nxpg
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Run style check
run: nix-shell --run "pg_csv-style-check"