chore: refactor CLI baseline using github.com/urfave/cli/v2
#245
Workflow file for this run
This file contains hidden or 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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
# Declare default permissions as read only. | |
permissions: read-all | |
jobs: | |
test-coverage: | |
if: false # temporary disable | |
name: Coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Install Go | |
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 | |
with: | |
go-version: oldstable | |
check-latest: true | |
cache-dependency-path: "**/go.mod" | |
- name: Run coverage tests | |
run: go test ./... -coverprofile=coverage.txt -covermode=atomic | |
- name: Upload coverage report | |
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0 | |
compatibility-test: | |
if: false # temporary disable | |
name: Test (go ${{ matrix.go-version }}, ${{ matrix.platform.os }} ${{ matrix.platform.arch }}) | |
strategy: | |
matrix: | |
go-version: [stable, oldstable] | |
platform: | |
- os: ubuntu-latest | |
arch: "386" | |
- os: ubuntu-latest | |
arch: amd64 | |
- os: ubuntu-22.04-arm | |
arch: arm64 | |
- os: macos-13 | |
arch: amd64 | |
- os: macos-latest | |
arch: arm64 | |
- os: windows-latest | |
arch: "386" | |
- os: windows-latest | |
arch: amd64 | |
runs-on: ${{ matrix.platform.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Install Go | |
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
check-latest: true | |
cache-dependency-path: "**/go.mod" | |
- name: Run tests | |
env: | |
GOARCH: ${{ matrix.platform.arch }} | |
run: go test -shufle=on ./... | |
done: | |
name: Done | |
runs-on: ubuntu-latest | |
needs: [compatibility-test] | |
# temporary disable | |
if: false #'!cancelled()' | |
steps: | |
- name: Success | |
run: | | |
echo ${{ needs.compatibility-test.result }} | |
test ${{ needs.compatibility-test.result }} == "success" |