...

Text file src/github.com/docker/cli/.github/workflows/test.yml

Documentation: github.com/docker/cli/.github/workflows

     1name: test
     2
     3concurrency:
     4  group: ${{ github.workflow }}-${{ github.ref }}
     5  cancel-in-progress: true
     6
     7on:
     8  workflow_dispatch:
     9  push:
    10    branches:
    11      - 'master'
    12      - '[0-9]+.[0-9]+'
    13    tags:
    14      - 'v*'
    15  pull_request:
    16
    17jobs:
    18  ctn:
    19    runs-on: ubuntu-22.04
    20    steps:
    21      -
    22        name: Checkout
    23        uses: actions/checkout@v4
    24      -
    25        name: Set up Docker Buildx
    26        uses: docker/setup-buildx-action@v3
    27      -
    28        name: Test
    29        uses: docker/bake-action@v4
    30        with:
    31          targets: test-coverage
    32      -
    33        name: Send to Codecov
    34        uses: codecov/codecov-action@v4
    35        with:
    36          file: ./build/coverage/coverage.txt
    37
    38  host:
    39    runs-on: ${{ matrix.os }}
    40    env:
    41      GOPATH: ${{ github.workspace }}
    42      GOBIN: ${{ github.workspace }}/bin
    43      GO111MODULE: auto
    44    strategy:
    45      fail-fast: false
    46      matrix:
    47        os:
    48          - macos-12
    49#          - 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
    50    steps:
    51      -
    52        name: Prepare git
    53        if: matrix.os == 'windows-latest'
    54        run: |
    55          git config --system core.autocrlf false
    56          git config --system core.eol lf
    57      -
    58        name: Checkout
    59        uses: actions/checkout@v4
    60        with:
    61          path: ${{ env.GOPATH }}/src/github.com/docker/cli
    62      -
    63        name: Set up Go
    64        uses: actions/setup-go@v5
    65        with:
    66          go-version: 1.21.8
    67      -
    68        name: Test
    69        run: |
    70          go test -coverprofile=/tmp/coverage.txt $(go list ./... | grep -vE '/vendor/|/e2e/')
    71          go tool cover -func=/tmp/coverage.txt
    72        working-directory: ${{ env.GOPATH }}/src/github.com/docker/cli
    73        shell: bash
    74      -
    75        name: Send to Codecov
    76        uses: codecov/codecov-action@v4
    77        with:
    78          file: /tmp/coverage.txt
    79          working-directory: ${{ env.GOPATH }}/src/github.com/docker/cli

View as plain text