EVEREST-601 PXC PITR #692
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: Main | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
check: | |
name: Checks | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
go-version: ${{ fromJson(inputs.go-version || '["1.21.x"]') }} | |
may-fail: [ false ] | |
env: | |
GO_VERSION: ${{ matrix.go-version }} | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Go release | |
if: env.GO_VERSION != 'tip' | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.21' | |
check-latest: true | |
- name: Install development tools | |
run: make init | |
- name: Check build | |
run: make build | |
- name: Check files are formatted and no source code changes | |
run: | | |
make format | |
pushd tools && go mod tidy -v | |
popd && go mod tidy -v | |
git status | |
git diff --exit-code | |
- name: Run check-license | |
run: | | |
# run license checker on configured files | |
bin/license-eye -c .licenserc.yaml header check | |
- name: Run go-sumtype | |
run: bin/go-sumtype ./... | |
- name: Run linters | |
run: | | |
# use GITHUB_TOKEN because only it has access to GitHub Checks API | |
bin/golangci-lint run --out-format=line-number | env REVIEWDOG_GITHUB_API_TOKEN=${{ secrets.GITHUB_TOKEN }} bin/reviewdog -f=golangci-lint -reporter=github-pr-review -filter-mode=nofilter -fail-on-error=true | |
- name: Run debug commands on failure | |
if: ${{ failure() }} | |
run: | | |
env | |
go version | |
go env | |
pwd | |
git status |