Merge pull request #16414 from SimonRichardson/ensure-cleanup-temp-files #2666
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: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
paths: | |
- '**.go' | |
- 'go.mod' | |
- '.github/workflows/client-tests.yml' | |
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: | |
# windows tests is disabled because we require a certain version of | |
# mongo (that's actually going away now though), and choclately was | |
# failing to install it correctly. | |
# os: [ubuntu-latest, macOS-latest, windows-latest] | |
os: [macOS-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- name: "Install Mongo Dependencies: ubuntu-latest" | |
if: (matrix.os == 'ubuntu-latest') | |
run: | | |
make install-mongo-dependencies | |
- name: "Remove Mongo Dependencies: windows-latest" | |
if: (matrix.os == 'windows-latest') | |
uses: crazy-max/ghaction-chocolatey@90deb87d9fbf0bb2f022b91e3bf11b4441cddda5 # v1 | |
with: | |
args: uninstall mongodb mongodb.install -y --all-versions | |
- name: "Install Mongo Dependencies: windows-latest" | |
if: (matrix.os == 'windows-latest') | |
uses: crazy-max/ghaction-chocolatey@90deb87d9fbf0bb2f022b91e3bf11b4441cddda5 # v1 | |
with: | |
args: install mongodb.install --version=5.0.5 --allow-downgrade | |
- name: "Test client" | |
run: | | |
# Jenkins can perform the full jujud testing. | |
go test -race -v ./cmd/juju/... -check.v -coverprofile=coverage.txt -covermode=atomic -timeout=15m | |
go test -race -v ./cmd/plugins/... -check.v | |
shell: bash |