...

Text file src/github.com/go-openapi/swag/.github/workflows/go-test.yml

Documentation: github.com/go-openapi/swag/.github/workflows

     1name: go test
     2
     3on:
     4  push:
     5    tags:
     6      - v*
     7    branches:
     8      - master
     9
    10  pull_request:
    11
    12jobs:
    13  lint:
    14    name: Lint
    15    runs-on: ubuntu-latest
    16    steps:
    17      - uses: actions/checkout@v4
    18      - uses: actions/setup-go@v5
    19        with:
    20          go-version: stable
    21          check-latest: true
    22          cache: true
    23      - name: golangci-lint
    24        uses: golangci/golangci-lint-action@v4
    25        with:
    26          version: latest
    27          only-new-issues: true
    28          skip-cache: true
    29
    30  test:
    31    name: Unit tests
    32    runs-on: ${{ matrix.os }}
    33
    34    strategy:
    35      matrix:
    36        os: [ ubuntu-latest, macos-latest, windows-latest ]
    37        go_version: ['oldstable', 'stable' ]
    38
    39    steps:
    40    - name: Run unit tests
    41      uses: actions/setup-go@v5
    42      with:
    43        go-version: '${{ matrix.go_version }}'
    44        check-latest: true
    45        cache: true
    46
    47    - uses: actions/checkout@v4
    48
    49    - run: go test -v -race -coverprofile="coverage-${{ matrix.os }}.${{ matrix.go_version }}.out" -covermode=atomic -coverpkg=$(go list)/... ./...
    50
    51    - name: Upload coverage to codecov
    52      uses: codecov/codecov-action@v4
    53      with:
    54        files: './coverage-${{ matrix.os }}.${{ matrix.go_version }}.out'
    55        flags: '${{ matrix.go_version }}'
    56        os: '${{ matrix.os }}'
    57        fail_ci_if_error: false
    58        verbose: true

View as plain text