Test-Layout s390x #929
Workflow file for this run
This file contains 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: Go | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
permissions: | |
contents: read | |
jobs: | |
test-build: | |
name: Test build | |
strategy: | |
matrix: | |
go-version: [1.18.x, 1.19.x, 1.20.x] | |
os: [ubuntu-latest] | |
include: | |
- go-version: 1.20.x | |
os: macos-latest | |
- go-version: 1.20.x | |
os: windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Install GNU utils on macOS | |
if: runner.os == 'macOS' | |
shell: bash | |
run: brew install coreutils | |
- name: Run tests | |
shell: bash | |
run: ./test | |
- name: Run linter | |
uses: golangci/golangci-lint-action@v3 | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
with: | |
version: v1.51.1 | |
args: -E=gofmt --timeout=30m0s | |
regenerate: | |
name: Regenerate docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.20.x | |
- name: Regenerate spec docs | |
run: ./generate | |
- name: Check whether spec docs are current | |
run: | | |
if [ -n "$(git status --porcelain docs)" ]; then | |
echo "Found local changes after regenerating:" | |
git --no-pager diff --color=always docs | |
echo "Rerun './generate'." | |
exit 1 | |
fi |