Skip to content

Updated to SDP v0.18.4-355-gc5f3851 #1256

Updated to SDP v0.18.4-355-gc5f3851

Updated to SDP v0.18.4-355-gc5f3851 #1256

Workflow file for this run

on: push
name: Test
jobs:
test:
strategy:
matrix:
# for now only support 1.22 because of loopvar change
# go-version: [1.22.x, 1.23.x]
go-version: [1.22.x]
os:
- ubuntu-latest
# - macos-latest
# - windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # also fetch tags and branches for `git describe`
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
check-latest: true
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Go Generate
run: go generate ./...
- name: Go vet
run: go vet ./...
# get .golangci.yml from github.com/overmindtech/golangci-lint_config
- name: Get .golangci.yml from github.com/overmindtech/golangci-lint_configs
run: |
curl -sfL https://raw.githubusercontent.com/overmindtech/golangci-lint_config/main/.golangci.yml -o .golangci.yml
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60.1
args: --timeout 3m
skip-cache: true # the linters require all code generation and dependecies to be present, but the cache implementation completely falls over when there is already existing content. See https://github.com/golangci/golangci-lint-action/issues/23, https://github.com/golangci/golangci-lint-action/issues/863, https://github.com/golangci/golangci-lint-action/issues/984
- name: re-export environment
run: |
grep -h '^[^#]' .github/env/*.env | sort -u | tee -a "${GITHUB_ENV}"
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Compose Action
uses: hoverkraft-tech/[email protected]
with:
compose-file: ".github/docker-compose-services.yml"
env:
HONEYCOMB_API_KEY: ${{ secrets.HONEYCOMB_API_KEY }}
- name: Test
run: go test ./... -race -timeout 2m
env:
API_SERVER_AUDIENCE: ${{ vars.API_SERVER_AUDIENCE }}
OVERMIND_NTE_ALLPERMS_DOMAIN: ${{ secrets.OVERMIND_NTE_ALLPERMS_DOMAIN }}
OVERMIND_NTE_ALLPERMS_CLIENT_ID: ${{ secrets.OVERMIND_NTE_ALLPERMS_CLIENT_ID }}
OVERMIND_NTE_ALLPERMS_CLIENT_SECRET: ${{ secrets.OVERMIND_NTE_ALLPERMS_CLIENT_SECRET }}
- name: Show container logs for debugging
if: failure()
run: |
docker compose -f .github/docker-compose-services.yml logs
- name: Show container logs for archival
if: ${{ ! failure() }}
run: |
docker compose -f .github/docker-compose-services.yml logs