Bump actions/checkout from 3 to 4 #146
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
# Workflow used as Continous Integration every time we have a PR. | |
name: CI | |
on: | |
# Only build when pushed to main | |
push: | |
branches: | |
- main | |
# Build all pull requests | |
pull_request: | |
jobs: | |
lint: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Lint with golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
build: | |
name: build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# We only support the latest version of all platforms. | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macOS-latest | |
go: | |
- "1.19" | |
- "1.20" | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Build | |
run: go build ./... | |
- name: Run Unit Tests | |
run: go test ./... | |