Merge pull request #15 from zostay/upgrade-go-std #55
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: Test Application | |
on: | |
push: | |
jobs: | |
tests: | |
name: Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.22" | |
- name: Setup golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.59 | |
args: --timeout=5m | |
- name: Install dependencies | |
run: go mod download | |
- name: Run tests | |
run: go test ./... | |
- name: Prepare/Release Workflows Check | |
run: | | |
go install github.com/mikefarah/yq/v4@latest | |
yq '.jobs.release.steps.[0:11]' .github/workflows/release.yaml > release-steps.yaml | |
yq '.jobs.prepare.steps' .github/workflows/prepare.yaml > prepare-steps.yaml | |
if ! diff release-steps.yaml prepare-steps.yaml; then | |
echo "Prepare and Release workflows are not in sync!" | |
exit 1 | |
fi | |
if ! yq '.jobs.release.steps.[11]' .github/workflows/release.yaml | grep -q 'Create Release'; then | |
echo 'Release has pre-build steps missing from Prepare workflow!' | |
exit 1 | |
fi |