2021-12-07 08:50:16 -05:00
name : test
2024-07-31 08:19:02 -04:00
# Default to 'contents: read', which grants actions to read commits.
#
# If any permission is set, any permission not included in the list is
# implicitly set to "none".
#
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions :
contents : read
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-06-11 06:55:39 -04:00
runs-on : ubuntu-24.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
2024-06-18 04:07:28 -04:00
uses : docker/bake-action@v5
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-07-19 07:03:53 -04:00
- macos-13 # macOS 13 on Intel
- macos-14 # macOS 14 on arm64 (Apple Silicon M1)
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 : 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-11-07 05:00:03 -05:00
go-version : 1.23 .3
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 }}