Skip to content

[opencti] update to 6.5.1 #114

[opencti] update to 6.5.1

[opencti] update to 6.5.1 #114

Workflow file for this run

name: go
on:
push:
branches:
- master
- main
pull_request:
paths:
- '**.go'
- '**go.mod'
- '**go.sum'
permissions:
contents: read
env:
GO_VERSION: '1.23.5'
GOLANGCI_LINT_VERSION: 'v1.62.0'
jobs:
golangci-lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
working-directory: .
args: --config=".golangci.yml"
go-test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: true
- name: Start environment
run: docker compose --file ./docker-compose.yml --env-file ./docker-compose.env up -d
- name: Wait on OpenCTI to be reachable
run: while [ "$(curl -o /dev/null -s -w %{http_code} localhost:8080)" -ne 200 ]; do echo "waiting..."; sleep 5; done
- name: Run tests
run: |
export CGO_ENABLED=1
export OPENCTI_URL=http://localhost:8080
export OPENCTI_TOKEN=f25e14de-9daa-11ef-97a3-03bdd8270110
go test -failfast -race -coverpkg=./... -covermode=atomic -coverprofile=coverage.txt ./... -timeout 60s
- name: Tear down environment
run: docker compose --env-file ./docker-compose.env down --volumes --timeout 30