-
Notifications
You must be signed in to change notification settings - Fork 73
59 lines (52 loc) · 1.28 KB
/
build-and-test.yml
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
name: CI tests
on:
- push
- pull_request
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
go:
- '1.13'
- stable
os:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Setup dependencies
run: |
sudo add-apt-repository ppa:dqlite/dev -y
sudo apt update
sudo apt install -y libsqlite3-dev libuv1-dev liblz4-dev libdqlite-dev
- name: Download deps
run: |
go get -t -tags libsqlite3 ./...
- name: Test
env:
LIBDQLITE_TRACE: 1
GO_DQLITE_MULTITHREAD: 1
run: |
go test -v -tags libsqlite3 -race -coverprofile=coverage.out github.com/canonical/go-dqlite/client -run TestMembership
- name: Coverage
uses: coverallsapp/github-action@v2
with:
file: coverage.out
parallel: true
finish:
needs: build-and-test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Finish coverage
uses: coverallsapp/github-action@v2
with:
parallel-finished: true