Merge pull request #55 from ryotarai/ryotarai/go-1.21 #104
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: CI | |
on: | |
push: | |
branches: [ master ] | |
tags-ignore: [ "**" ] | |
paths-ignore: [ "**.md" ] | |
pull_request: | |
types: [opened, synchronize] | |
paths-ignore: [ "**.md" ] | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ~1.21 | |
id: go | |
- name: Get dependencies | |
run: go mod download | |
- name: Get Devtools | |
run: make setup | |
- name: Lint | |
run : make lint | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ~1.21 | |
id: go | |
- name: Get dependencies | |
run: go mod download | |
- name: Get Devtools | |
run: make setup | |
- name: Build | |
run: make build-only | |
- name: Test | |
run: make test | |
validate-goreleaser: | |
name: Validate .goreleaser.yml | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ~1.21 | |
id: go | |
- name: Validate GoReleaser | |
uses: goreleaser/goreleaser-action@v3 | |
with: | |
args: release --snapshot --skip-publish --rm-dist --debug |