Skip to content

chore: bump monogdb requirement from 3.6 -> 4.4 #5

chore: bump monogdb requirement from 3.6 -> 4.4

chore: bump monogdb requirement from 3.6 -> 4.4 #5

Workflow file for this run

name: Lint & Test
on: [push, pull_request]
jobs:
lint-module:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.18.x
- name: Setup cache
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go-version }}-
- name: Run linter
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
test-module:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.18', '1.19', '1.20', '1.21']
mongodb-version: ['4.4', '5.0', '6.0', '7.0']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Start MongoDB Replica Set
uses: supercharge/mongodb-github-action@v1.10.0
with:
mongodb-version: ${{ matrix.mongodb-version }}
mongodb-replica-set: replset
mongodb-db: mgoddb
- name: Setup cache
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go-version }}-
- name: Run tests
run: go test ./...