Add roughtime.se to ecosystem. #51
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: Build and Test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- ready_for_review | |
branches: | |
- master | |
jobs: | |
build: | |
strategy: | |
matrix: | |
platform: [ubuntu-latest, macos-latest] | |
name: Build | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ^1.21 | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Build | |
run: go build -v ./... | |
test: | |
strategy: | |
matrix: | |
platform: [ubuntu-latest, macos-latest] | |
name: Test | |
runs-on: ${{ matrix.platform }} | |
needs: | |
- build | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ^1.21 | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Test | |
run: go test -v ./... | |
race: | |
strategy: | |
matrix: | |
platform: [ubuntu-latest, macos-latest] | |
name: Race condition test | |
runs-on: ${{ matrix.platform }} | |
needs: | |
- build | |
- test | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ^1.21 | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Test race conditions | |
run: go test -v -race ./... | |
coverage: | |
strategy: | |
matrix: | |
platform: [ubuntu-latest, macos-latest] | |
name: Test coverage | |
runs-on: ${{ matrix.platform }} | |
needs: | |
- build | |
- test | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ^1.21 | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Test coverage | |
run: go test -v -cover -covermode=atomic -coverpkg=./... -coverprofile=coverage.txt ./... | |
# TODO: upload coverage.txt to codecov.io or similar | |
lint: | |
name: Golangci Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ^1.21 | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.54 |