Skip to content

CI

CI #452

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
paths-ignore:
- ".git**"
- README.md
- docs
workflow_dispatch:
jobs:
test-go:
name: Test Go
runs-on: ubuntu-latest
permissions:
packages: read
services:
mongodb:
image: mongo:2.6
ports:
- "27017:27017"
options: >-
--health-cmd "mongo --eval 'rs.initiate();'"
--health-interval 15s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: make unit_tests
- run: |
go build
go test -race -v ./integration_tests
timeout-minutes: 15
env:
GO_BUILD_ENV: CGO_ENABLED=0
ROUTER_MONGO_URL: 127.0.0.1
ROUTER_DEBUG: "1"
ROUTER_DEBUG_TESTS: "1"
golangci-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
with:
version: v1.55.2