You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.1 KiB

name: Run Tests
5 years ago
on:
5 years ago
push:
branches:
- main
tags:
- v2.*
5 years ago
pull_request:
branches:
- main
permissions:
contents: read
5 years ago
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go: [1.17.x, 1.18.x, 1.19.x]
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}
5 years ago
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: Set PATH
run: echo "${GITHUB_WORKSPACE}/.local/bin" >>"${GITHUB_PATH}"
- uses: actions/checkout@v3
- if: matrix.go == '1.19.x' && matrix.os == 'ubuntu-latest'
run: make ensure-goimports
- if: matrix.go == '1.19.x' && matrix.os == 'ubuntu-latest'
run: make lint
- run: make vet
- run: make tag-test
- run: make test
- run: make -C cmd/urfave-cli-genflags
- run: make check-binary-size
- run: make tag-check-binary-size
- run: make yamlfmt
- run: make diffcheck
- run: make v2diff
- if: success() && matrix.go == '1.19.x' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v3
5 years ago
with:
token: ${{ secrets.CODECOV_TOKEN }}
5 years ago
fail_ci_if_error: true
test-docs:
name: test-docs
runs-on: ubuntu-latest
5 years ago
steps:
- uses: actions/setup-go@v3
5 years ago
with:
go-version: 1.19.x
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Set PATH
run: echo "${GITHUB_WORKSPACE}/.local/bin" >>"${GITHUB_PATH}"
- uses: actions/checkout@v3
- run: make ensure-gfmrun
- run: make gfmrun
- run: make diffcheck
publish:
permissions:
contents: write
if: startswith(github.ref, 'refs/tags/')
name: publish
needs: [test-docs]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: make ci-ensure-mkdocs
- run: make set-mkdocs-remote
env:
MKDOCS_REMOTE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: make deploy-mkdocs