2021-12-07 08:50:16 -05:00
name : test
2022-08-18 14:03:28 -04:00
concurrency :
group : ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress : true
2021-12-07 08:50:16 -05:00
on :
workflow_dispatch :
push :
branches :
- 'master'
2023-02-09 12:03:11 -05:00
- '[0-9]+.[0-9]+'
2021-12-07 08:50:16 -05:00
tags :
- 'v*'
pull_request :
jobs :
ctn :
2022-08-20 09:55:20 -04:00
runs-on : ubuntu-20.04
2021-12-07 08:50:16 -05:00
steps :
-
name : Checkout
2022-08-20 09:55:20 -04:00
uses : actions/checkout@v3
2021-12-07 08:50:16 -05:00
-
name : Set up Docker Buildx
2022-08-20 09:55:20 -04:00
uses : docker/setup-buildx-action@v2
2021-12-07 08:50:16 -05:00
-
name : Test
2023-04-18 05:03:03 -04:00
uses : docker/bake-action@v3
2021-12-07 08:50:16 -05:00
with :
targets : test-coverage
-
name : Send to Codecov
2022-08-20 09:55:20 -04:00
uses : codecov/codecov-action@v3
2021-12-07 08:50:16 -05:00
with :
file : ./build/coverage/coverage.txt
host :
runs-on : ${{ matrix.os }}
env :
GOPATH : ${{ github.workspace }}
GOBIN : ${{ github.workspace }}/bin
GO111MODULE : auto
strategy :
fail-fast : false
matrix :
os :
2024-01-15 09:00:09 -05:00
- macos-12
2022-08-20 09:55:20 -04:00
# - windows-2022 # FIXME: some tests are failing on the Windows runner, as well as on Appveyor since June 24, 2018: https://ci.appveyor.com/project/docker/cli/history
2021-12-07 08:50:16 -05:00
steps :
-
name : Prepare git
if : matrix.os == 'windows-latest'
run : |
git config --system core.autocrlf false
git config --system core.eol lf
-
name : Checkout
2022-08-20 09:55:20 -04:00
uses : actions/checkout@v3
2021-12-07 08:50:16 -05:00
with :
path : ${{ env.GOPATH }}/src/github.com/docker/cli
-
name : Set up Go
2022-08-20 09:55:20 -04:00
uses : actions/setup-go@v3
2021-12-07 08:50:16 -05:00
with :
2024-09-02 09:49:35 -04:00
go-version : 1.22 .6
2021-12-07 08:50:16 -05:00
-
name : Test
run : |
go test -coverprofile=/tmp/coverage.txt $(go list ./... | grep -vE '/vendor/|/e2e/')
go tool cover -func=/tmp/coverage.txt
working-directory : ${{ env.GOPATH }}/src/github.com/docker/cli
shell : bash
-
name : Send to Codecov
2022-08-20 09:55:20 -04:00
uses : codecov/codecov-action@v3
2021-12-07 08:50:16 -05:00
with :
file : /tmp/coverage.txt
working-directory : ${{ env.GOPATH }}/src/github.com/docker/cli