Merge pull request #4849 from thaJeztah/image_list_dedup #2
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: test | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'master' | |
- '[0-9]+.[0-9]+' | |
tags: | |
- 'v*' | |
pull_request: | |
jobs: | |
ctn: | |
runs-on: ubuntu-20.04 | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- | |
name: Test | |
uses: docker/bake-action@v4 | |
with: | |
targets: test-coverage | |
- | |
name: Send to Codecov | |
uses: codecov/codecov-action@v4 | |
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: | |
- macos-12 | |
# - 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 | |
steps: | |
- | |
name: Prepare git | |
if: matrix.os == 'windows-latest' | |
run: | | |
git config --system core.autocrlf false | |
git config --system core.eol lf | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: ${{ env.GOPATH }}/src/github.com/docker/cli | |
- | |
name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.21.6 | |
- | |
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 | |
uses: codecov/codecov-action@v4 | |
with: | |
file: /tmp/coverage.txt | |
working-directory: ${{ env.GOPATH }}/src/github.com/docker/cli |