Skip to content

open ai toxicity plugin #62

open ai toxicity plugin

open ai toxicity plugin #62

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: Test
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379
postgres:
image: postgres:13
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: aigateway_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.4'
check-latest: true
cache: false # Disable Go module cache
- name: Install dependencies
run: |
go clean -modcache
go mod download
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
skip-cache: true # Skip using cache for linter
args: --timeout=5m # Increase timeout to 5 minutes
only-new-issues: true # Only report new issues
- name: Run tests
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
env:
REDIS_URL: redis://localhost:6379
POSTGRES_URL: postgres://postgres:postgres@localhost:5432/aigateway_test?sslmode=disable
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.txt
flags: unittests