-
Notifications
You must be signed in to change notification settings - Fork 71
72 lines (60 loc) · 1.76 KB
/
coverage.yml
File metadata and controls
72 lines (60 loc) · 1.76 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
name: Code coverage
on:
pull_request:
push:
branches:
- main
env:
PG_VERSION: 18
PG_PACKAGE: psp
# Avoid failures on slow recovery
PGCTLTIMEOUT: 120
PG_TEST_TIMEOUT_DEFAULT: 300
jobs:
collect:
name: Collect and upload
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- name: Remove existing PostgreSQL
run: sudo apt purge postgresql* libpq*
- name: Clone repository
uses: actions/checkout@v6
with:
submodules: recursive
ref: ${{ github.ref }}
- name: Install dependencies
run: .github/scripts/ubuntu-deps.sh dev
- name: Install PostgreSQL
run: .github/scripts/install-postgresql.sh ${{ env.PG_PACKAGE }} ${{ env.PG_VERSION }}
- name: Build pg_stat_monitor
run: .github/scripts/build.sh coverage
- name: Set permissions
run: sudo chown -R runner:runner /var/run/postgresql
- name: Stop existing PostgreSQL instances
run: sudo service postgresql stop
- name: Run tests
run: .github/scripts/test.sh
- name: Collect coverage data
run: find . -type f -name '*.c' | xargs -t gcov -abcfu
- name: Upload coverage data to codecov.io
uses: codecov/codecov-action@v6
with:
verbose: true
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
files: "*.c.gcov"
- name: Report on test fail
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: coverage-testlog
path: |
regression_install
regression_install.log
regression.diffs
regression.out
results
t/results
tmp_check
retention-days: 3