Skip to content

Fixes for unit tests and golangci-lint #7

Fixes for unit tests and golangci-lint

Fixes for unit tests and golangci-lint #7

Workflow file for this run

name: Go
on: [ pull_request, workflow_dispatch ]
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.56.2
args: --skip-dirs tests --modules-download-mode mod --timeout 10m --verbose
build:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.21
- name: Check out code
uses: actions/checkout@v4
- name: Build
run: go build -v ./
- name: Store funnel
uses: actions/upload-artifact@v4
with:
name: funnelBin
path: funnel
unitTest:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.21
- name: Check out code
uses: actions/checkout@v4
- name: Unit Tests
run: make test
mongoTest:
runs-on: ubuntu-latest
needs: build
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Download funnel bin
uses: actions/download-artifact@v4
with:
name: funnelBin
- name: MongoTest
run: |
chmod +x funnel
make start-mongodb
sleep 10
make test-mongodb
badgerTest:
runs-on: ubuntu-latest
needs: build
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Download funnel bin
uses: actions/download-artifact@v4
with:
name: funnelBin
- name: Badger Test
run: |
chmod +x funnel
make test-badger