File tree 1 file changed +64
-0
lines changed
1 file changed +64
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Code Coverage
2
+
3
+ on :
4
+ pull_request :
5
+ push :
6
+ branches :
7
+ - master
8
+
9
+ permissions :
10
+ contents : write
11
+
12
+ jobs :
13
+ code-coverage :
14
+ name : Code Coverage
15
+ runs-on : ubuntu-20.04
16
+ steps :
17
+ - name : Checkout code
18
+ uses : actions/checkout@v4
19
+
20
+ - name : Install Rust toolchain
21
+ uses : actions-rs/toolchain@v1
22
+ with :
23
+ toolchain : 1.81.0
24
+ components : llvm-tools-preview
25
+
26
+ - name : Install cargo-llvm-cov
27
+ uses : taiki-e/install-action@cargo-llvm-cov
28
+
29
+ - run : |
30
+ sudo apt remove -y postgres*
31
+ sudo apt-get install -y wget gnupg
32
+ sudo sh -c 'echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
33
+ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
34
+ sudo apt-get update -y -qq --fix-missing
35
+ sudo apt-get install -y \
36
+ clang-10 \
37
+ llvm-10 \
38
+ clang \
39
+ gcc \
40
+ make \
41
+ build-essential \
42
+ libz-dev \
43
+ zlib1g-dev \
44
+ strace \
45
+ libssl-dev \
46
+ pkg-config \
47
+ postgresql-16 \
48
+ postgresql-server-dev-16
49
+ sudo chmod a+rwx `/usr/lib/postgresql/16/bin/pg_config --pkglibdir` `/usr/lib/postgresql/16/bin/pg_config --sharedir`/extension /var/run/postgresql/
50
+
51
+ - run : cargo install cargo-pgrx --version 0.12.6
52
+ - run : cargo pgrx init --pg16 /usr/lib/postgresql/16/bin/pg_config
53
+
54
+ - name : Generate code coverage
55
+ id : coverage
56
+ run : |
57
+ cargo llvm-cov test --workspace --no-fail-fast --lcov --output-path lcov.info
58
+
59
+ - name : Coveralls upload
60
+ uses : coverallsapp/github-action@v2
61
+ with :
62
+ github-token : ${{ secrets.GITHUB_TOKEN }}
63
+ path-to-lcov : lcov.info
64
+ debug : true
You can’t perform that action at this time.
0 commit comments