mod: bump github.com/go-sql-driver/mysql from 1.7.1 to 1.8.1 #261
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: Go | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- '**.go' | |
- 'go.mod' | |
- '.golangci.yml' | |
- '.github/workflows/go.yml' | |
pull_request: | |
paths: | |
- '**.go' | |
- 'go.mod' | |
- '.golangci.yml' | |
- '.github/workflows/go.yml' | |
env: | |
GOPROXY: "https://proxy.golang.org" | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: latest | |
args: --timeout=30m | |
test: | |
name: Test | |
strategy: | |
matrix: | |
go-version: [ 1.22.x ] | |
platform: [ ubuntu-latest, macos-latest, windows-latest ] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Run tests with coverage | |
run: go test -shuffle=on -v -race -coverprofile=coverage -covermode=atomic | |
- name: Upload coverage report to Codecov | |
uses: codecov/[email protected] | |
with: | |
file: ./coverage | |
flags: unittests | |
postgres: | |
name: Postgres | |
strategy: | |
matrix: | |
go-version: [ 1.22.x ] | |
platform: [ ubuntu-latest ] | |
runs-on: ${{ matrix.platform }} | |
services: | |
postgres: | |
image: postgres:9.6 | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Run tests with coverage | |
run: go test -shuffle=on -v -race -coverprofile=coverage -covermode=atomic ./postgres | |
env: | |
PGPORT: 5432 | |
PGHOST: localhost | |
PGUSER: postgres | |
PGPASSWORD: postgres | |
PGSSLMODE: disable | |
- name: Upload coverage report to Codecov | |
uses: codecov/[email protected] | |
with: | |
file: ./coverage | |
flags: unittests | |
redis: | |
name: Redis | |
strategy: | |
matrix: | |
go-version: [ 1.22.x ] | |
platform: [ ubuntu-latest ] | |
runs-on: ${{ matrix.platform }} | |
services: | |
redis: | |
image: redis:4 | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 6379:6379 | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Run tests with coverage | |
run: go test -shuffle=on -v -race -coverprofile=coverage -covermode=atomic ./redis | |
env: | |
REDIS_HOST: localhost | |
REDIS_PORT: 6379 | |
- name: Upload coverage report to Codecov | |
uses: codecov/[email protected] | |
with: | |
file: ./coverage | |
flags: unittests | |
mysql: | |
name: MySQL | |
strategy: | |
matrix: | |
go-version: [ 1.22.x ] | |
platform: [ ubuntu-20.04 ] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Start MySQL server | |
run: sudo systemctl start mysql | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Run tests with coverage | |
run: go test -shuffle=on -v -race -coverprofile=coverage -covermode=atomic ./mysql | |
env: | |
MYSQL_USER: root | |
MYSQL_PASSWORD: root | |
MYSQL_HOST: localhost | |
MYSQL_PORT: 3306 | |
- name: Upload coverage report to Codecov | |
uses: codecov/[email protected] | |
with: | |
file: ./coverage | |
flags: unittests | |
mongo: | |
name: Mongo | |
strategy: | |
matrix: | |
go-version: [ 1.22.x ] | |
platform: [ ubuntu-latest ] | |
runs-on: ${{ matrix.platform }} | |
services: | |
mongodb: | |
image: mongo:5 | |
env: | |
MONGO_INITDB_ROOT_USERNAME: root | |
MONGO_INITDB_ROOT_PASSWORD: password | |
options: >- | |
--health-cmd mongo | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 27017:27017 | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Run tests with coverage | |
run: go test -shuffle=on -v -race -coverprofile=coverage -covermode=atomic ./mongo | |
env: | |
MONGODB_URI: mongodb://root:password@localhost:27017 | |
- name: Upload coverage report to Codecov | |
uses: codecov/[email protected] | |
with: | |
file: ./coverage | |
flags: unittests | |
sqlite: | |
name: SQLite | |
strategy: | |
matrix: | |
go-version: [ 1.22.x ] | |
platform: [ ubuntu-latest ] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Run tests with coverage | |
run: go test -shuffle=on -v -race -coverprofile=coverage -covermode=atomic ./sqlite | |
- name: Upload coverage report to Codecov | |
uses: codecov/[email protected] | |
with: | |
file: ./coverage | |
flags: unittests |