mod: bump go.mongodb.org/mongo-driver from 1.14.0 to 1.15.0 (#114) #279
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 | |
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 | |
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 | |
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 | |
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 | |
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 |