Added tests for stream object #1156
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: Tests | |
on: push | |
jobs: | |
test: | |
name: test | |
runs-on: depot-ubuntu-22.04-8 | |
strategy: | |
matrix: | |
# for now only support 1.22 for loopvar change | |
go-version: [1.22.x] | |
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 ./... | |
- 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 | |
- 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/compose-action@v2.0.2 | |
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_CLIENT_ID: ${{ secrets.OVERMIND_NTE_ALLPERMS_CLIENT_ID }} | |
OVERMIND_NTE_ALLPERMS_CLIENT_SECRET: ${{ secrets.OVERMIND_NTE_ALLPERMS_CLIENT_SECRET }} | |
OVERMIND_NTE_ALLPERMS_DOMAIN: ${{ secrets.OVERMIND_NTE_ALLPERMS_DOMAIN }} | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: | |
- test | |
steps: | |
# Creates a release and attaches | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
generateReleaseNotes: true | |
token: ${{ secrets.GITHUB_TOKEN }} |