50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: test
|
|
on:
|
|
push:
|
|
tags-ignore:
|
|
- '**'
|
|
branches:
|
|
- '**'
|
|
pull_request:
|
|
jobs:
|
|
golangci:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
# Prevent duplicate builds on internal PRs.
|
|
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: actions/setup-go@v7
|
|
with:
|
|
go-version: stable
|
|
- name: Read golangci-lint version
|
|
id: golangci-lint-version
|
|
run: echo "version=$(cat .golangci-lint-version)" >> "$GITHUB_OUTPUT"
|
|
- name: golangci-lint
|
|
uses: golangci/golangci-lint-action@v9
|
|
with:
|
|
version: ${{ steps.golangci-lint-version.outputs.version }}
|
|
args: --timeout 10m0s --verbose
|
|
test:
|
|
name: Test with Go ${{ matrix.go-version }}
|
|
runs-on: ubuntu-latest
|
|
# Prevent duplicate builds on internal PRs.
|
|
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
|
|
strategy:
|
|
matrix:
|
|
go-version: [1.26.8]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Install Go
|
|
uses: actions/setup-go@v7
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- name: Start services
|
|
run: docker compose up -d --wait
|
|
|
|
- name: Test
|
|
run: make test-integration
|