openai: add make it possible to set the "user" in the gpt completion call #1102
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
test: | |
name: Run tests | |
strategy: | |
fail-fast: false | |
matrix: | |
# https://github.com/actions/go-versions/blob/main/versions-manifest.json | |
go-version: [1.20.x, 1.21.x] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
stable: false | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Run tests | |
run: make test | |
env: | |
BOT_GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
test-extended: | |
name: Run race+coverage tests | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: stable | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Build binary | |
run: make build/slack-bot | |
- name: Run tests with race | |
run: make test-race | |
env: | |
BOT_GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Test with coverage | |
run: make test-coverage | |
env: | |
BOT_GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload Coverage | |
uses: codecov/codecov-action@v3 | |
lint: | |
name: Lint | |
if: ${{ github.event_name == 'pull_request' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3.7.0 | |
with: | |
only-new-issues: true | |
args: --timeout=3m | |
security: | |
name: Security | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run Gosec Security Scanner | |
uses: securego/gosec@master | |
with: | |
args: -exclude=G404,G307,G104 ./... | |
- name: Run govulncheck | |
uses: Templum/govulncheck-action@v0.10.0 | |
with: | |
package: ./... | |
docker: | |
name: Build Docker image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3.0.0 | |
- name: Build and push | |
uses: docker/build-push-action@v5.0.0 | |
with: | |
context: . | |
load: true |