Skip to content

Use Go 1.21

Use Go 1.21 #24

Workflow file for this run

name: tests
on:
pull_request:
paths:
- '.github/workflows/go-tests.yml'
- '**.go'
jobs:
lint:
name: Lint checking on Ubuntu
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
id: go
with:
go-version: '1.21'
cache: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
build:
name: Test on ${{ matrix.os }} with ${{ matrix.go }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
go: [1.21]
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
cache: true
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Put a dummy js file for go:embed.
run: |
mkdir -p dashboard/public/
touch dashboard/public/bundle.js
- name: Check whether a goptuna binary is successfully built.
run: go build -o ./goptuna cmd/main.go
test:
name: Test on ${{ matrix.os }} with ${{ matrix.go }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
go: [1.21]
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
cache: true
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Running go tests
run: make test