Merge pull request #17414 from jack-w-shaw/remove_unused_test_funcs #575
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v3 | |
- name: "Set up Go" | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- name: "Install musl & dqlite (Ubuntu)" | |
if: (matrix.os == 'ubuntu-latest') | |
shell: bash | |
run: | | |
sudo make MUSL_CROSS_COMPILE=0 musl-install dqlite-install | |
- 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 |