...

Text file src/github.com/urfave/cli/v2/.github/workflows/cli.yml

Documentation: github.com/urfave/cli/v2/.github/workflows

     1name: Run Tests
     2on:
     3  push:
     4    branches:
     5      - v2-maint
     6    tags:
     7      - v2.*
     8  pull_request:
     9    branches:
    10      - v2-maint
    11permissions:
    12  contents: read
    13jobs:
    14  test:
    15    strategy:
    16      matrix:
    17        os: [ubuntu-latest, macos-latest, windows-latest]
    18        go: [stable, oldstable]
    19    name: ${{ matrix.os }} @ Go ${{ matrix.go }}
    20    runs-on: ${{ matrix.os }}
    21    steps:
    22      - uses: actions/checkout@v4
    23      - uses: actions/setup-go@v4
    24        with:
    25          go-version: ${{ matrix.go }}
    26      - name: Set PATH
    27        run: echo "${GITHUB_WORKSPACE}/.local/bin" >>"${GITHUB_PATH}"
    28      - if: matrix.go == 'stable' && matrix.os == 'ubuntu-latest'
    29        run: make ensure-goimports
    30      - if: matrix.go == 'stable' && matrix.os == 'ubuntu-latest'
    31        run: make lint
    32      - run: make vet
    33      - run: make test
    34        env:
    35          GFLAGS: -tags urfave_cli_no_docs
    36      - run: make test
    37      - run: make -C cmd/urfave-cli-genflags
    38      - run: make check-binary-size
    39        env:
    40          GFLAGS: -tags urfave_cli_no_docs
    41      - run: make check-binary-size
    42      - run: make yamlfmt
    43      - if: matrix.go == 'stable' && matrix.os == 'ubuntu-latest'
    44        run: make generate
    45      - run: make diffcheck
    46      - if: matrix.go == 'stable' && matrix.os == 'ubuntu-latest'
    47        run: make v2diff
    48      - if: success() && matrix.go == 'stable' && matrix.os == 'ubuntu-latest'
    49        uses: codecov/codecov-action@v3
    50        with:
    51          token: ${{ secrets.CODECOV_TOKEN }}
    52          fail_ci_if_error: true
    53  test-docs:
    54    name: test-docs
    55    runs-on: ubuntu-latest
    56    steps:
    57      - uses: actions/checkout@v4
    58      - uses: actions/setup-go@v4
    59        with:
    60          go-version: stable
    61      - uses: actions/setup-node@v4
    62        with:
    63          node-version: '16'
    64      - name: Set PATH
    65        run: echo "${GITHUB_WORKSPACE}/.local/bin" >>"${GITHUB_PATH}"
    66      - run: make ensure-gfmrun
    67      - run: make gfmrun
    68        env:
    69          FLAGS: --walk docs/v2/
    70      - run: make diffcheck
    71  publish:
    72    permissions:
    73      contents: write
    74    if: startswith(github.ref, 'refs/tags/')
    75    name: publish
    76    needs: [test-docs]
    77    runs-on: ubuntu-latest
    78    steps:
    79      - uses: actions/checkout@v4
    80        with:
    81          fetch-depth: 0
    82      - run: make ensure-mkdocs
    83        env:
    84          FLAGS: --upgrade-pip
    85      - run: make set-mkdocs-remote
    86        env:
    87          MKDOCS_REMOTE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    88      - run: make deploy-mkdocs

View as plain text