feat: auto-release based on conventional-commits to semantic-versioning #174
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: Test, Lint | |
on: | |
push: | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go-version: [1.17] | |
steps: | |
- name: Setup Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Cache Go modules | |
uses: actions/cache@v2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.go-version }}-go- | |
- name: Run tests | |
run: make test | |
- uses: codecov/codecov-action@v2 | |
with: | |
file: coverage.out | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go-version: [1.17] | |
steps: | |
- name: Setup Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Cache Go modules | |
uses: actions/cache@v2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.go-version }}-go- | |
- name: Run linter | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: latest | |
skip-cache: true |