Skip to content

Allow time.Duration or int for timeouts #251

Allow time.Duration or int for timeouts

Allow time.Duration or int for timeouts #251

Workflow file for this run

name: CI
on:
push:
tags:
- v*
branches:
- master
- main
pull_request:
branches:
- master
- main
permissions:
contents: read
jobs:
golangci:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
name: Linter
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.18'
- name: Install golangci-lint
run: |
curl -sSLO https://github.com/golangci/golangci-lint/releases/download/v$GOLANGCI_LINT_VERSION/golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz
tar -xf golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz
sudo mv golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64/golangci-lint /usr/local/bin/golangci-lint
rm -rf golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64*
env:
GOLANGCI_LINT_VERSION: '1.50.1'
- name: Run Lint
run: make lint
build:
name: build
runs-on: ubuntu-latest
strategy:
matrix:
go: [1.18]
fix-version:
-
- fix40
- fix41
- fix42
- fix43
- fix44
- fix50
- fix50sp1
- fix50sp2
steps:
- name: Setup
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Check out source
uses: actions/checkout@v2
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-replica-set: replicaset
- name: Install ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- name: Test
env:
GO111MODULE: on
MONGODB_TEST_CXN: mongodb://localhost:27017
FIX_TEST: ${{ matrix.fix-version }}
run: if [ -z $FIX_TEST ]; then make build-src && make test-ci; else make generate-ci && make build && make $FIX_TEST; fi