-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (63 loc) · 2.01 KB
/
client-tests.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: "Client Tests"
on:
push:
branches: [2.*, 3.*, 4.*, main]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- '**.go'
- 'go.mod'
- '.github/workflows/client-tests.yml'
- 'scripts/dqlite/**'
- 'Makefile'
- 'make_functions.sh'
workflow_dispatch:
permissions:
contents: read
jobs:
test-client-ubuntu:
name: "Client Tests"
runs-on: ${{ matrix.os }}
if: github.event.pull_request.draft == false
strategy:
fail-fast: false
matrix:
os: [macOS-latest]
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: "Install Mongo Dependencies (Ubuntu)"
if: (matrix.os == 'ubuntu-latest')
run: |
make install-mongo-dependencies
- name: "Install musl & dqlite (Ubuntu)"
if: (matrix.os == 'ubuntu-latest')
shell: bash
run: |
sudo make MUSL_CROSS_COMPILE=0 musl-install dqlite-install
- name: "Install Mongo Dependencies (macOS)"
if: (matrix.os == 'macOS-latest')
run: |
brew tap mongodb/brew
brew update
brew install [email protected]
brew link [email protected]
brew services start mongodb/brew/[email protected]
- name: "Test client (Ubuntu)"
if: (matrix.os == 'ubuntu-latest')
shell: bash
run: |
# Jenkins can perform the full jujud testing.
TEST_PACKAGES=./cmd/juju/... COVERAGE_CHECK=1 TEST_TIMEOUT="15m" make run-go-tests
TEST_PACKAGES=./cmd/plugins/... COVERAGE_CHECK=1 TEST_TIMEOUT="15m" make run-go-tests
- name: "Test client (macOS)"
if: (matrix.os == 'macOS-latest')
shell: bash
run: |
go test -race -v ./cmd/juju/... -check.v -coverprofile=coverage.txt -covermode=atomic -timeout=15m
go test -race -v ./cmd/plugins/... -check.v -coverprofile=coverage.txt -covermode=atomic -timeout=15m