Skip to content

- [add]try compiling in Go 1.22. #142

- [add]try compiling in Go 1.22.

- [add]try compiling in Go 1.22. #142

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
branches: [ "r1.0" ]
pull_request:
branches: [ "r1.0" ]
jobs:
go20_redis7_mysql8:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and start containers
run: docker-compose -f tests/environments/go1.20_redis7_mysql8/docker-compose.yml up -d --build && docker ps
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.20"
check-latest: true
- name: Build
run: go mod tidy && go build -v ./...
- name: Test
run: |
go test -race -cover -v ./... -coverprofile coverage.txt -coverpkg ./...
go tool cover -func=coverage.txt -o=coverage.out
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.txt
- name: Benchmark
run: go test -race -v ./... -bench . -run ^$ -count 10 -benchmem
- name: Stop containers
if: always()
run: docker-compose -f tests/environments/go1.20_redis7_mysql8/docker-compose.yml down
go21_redis7_mysql8:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and start containers
run: docker-compose -f tests/environments/go1.21_redis7_mysql8/docker-compose.yml up -d --build && docker ps
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
check-latest: true
- name: Build
run: go mod tidy && go build -v ./...
- name: Test
run: go test -race -v ./...
- name: Benchmark
run: go test -race -v ./... -bench . -run ^$ -count 10 -benchmem
- name: Stop containers
if: always()
run: docker-compose -f tests/environments/go1.21_redis7_mysql8/docker-compose.yml down
go22_redis7_mysql8:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and start containers
run: docker-compose -f tests/environments/go1.22_redis7_mysql8/docker-compose.yml up -d --build && docker ps
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
check-latest: true
- name: Build
run: go mod tidy && go build -v ./...
- name: Test
run: go test -race -v ./...
- name: Benchmark
run: go test -race -v ./... -bench . -run ^$ -count 10 -benchmem
- name: Stop containers
if: always()
run: docker-compose -f tests/environments/go1.22_redis7_mysql8/docker-compose.yml down