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 :
2024-02-13 08:30:09 -05:00
runs-on : ubuntu-22.04
2021-12-07 08:50:16 -05:00
steps :
-
name : Checkout
2023-09-05 04:37:30 -04:00
uses : actions/checkout@v4
2021-12-07 08:50:16 -05:00
-
name : Set up Docker Buildx
2023-09-12 04:24:45 -04:00
uses : docker/setup-buildx-action@v3
2021-12-07 08:50:16 -05:00
-
name : Test
2023-09-12 05:29:01 -04:00
uses : docker/bake-action@v4
2021-12-07 08:50:16 -05:00
with :
targets : test-coverage
-
name : Send to Codecov
2024-02-01 03:57:32 -05:00
uses : codecov/codecov-action@v4
2021-12-07 08:50:16 -05:00
with :
file : ./build/coverage/coverage.txt
2024-02-22 12:11:18 -05:00
token : ${{ secrets.CODECOV_TOKEN }}
2021-12-07 08:50:16 -05:00
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
2023-09-05 04:37:30 -04:00
uses : actions/checkout@v4
2021-12-07 08:50:16 -05:00
with :
path : ${{ env.GOPATH }}/src/github.com/docker/cli
-
name : Set up Go
2023-12-07 03:17:34 -05:00
uses : actions/setup-go@v5
2021-12-07 08:50:16 -05:00
with :
2024-02-19 08:13:51 -05:00
go-version : 1.21 .7
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
2024-02-01 03:57:32 -05:00
uses : codecov/codecov-action@v4
2021-12-07 08:50:16 -05:00
with :
file : /tmp/coverage.txt
working-directory : ${{ env.GOPATH }}/src/github.com/docker/cli
2024-02-22 12:11:18 -05:00
token : ${{ secrets.CODECOV_TOKEN }}