Shutdown function: Avoid potential crash with empty config #1164
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: CI | |
# N.B.: release.yml should be updated to match as necessary | |
permissions: {} | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
# Use new enough OS that has CGroupsv2 enabled (required by the integration tests) | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21 | |
id: go | |
- name: Set up protoc | |
uses: pganalyze/setup-protoc@ab6203da1c3118e4406048171b09238ad31ad73e | |
with: | |
version: 3.14.0 | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Runs tests | |
run: | | |
make build OUTFILE=pganalyze-collector-linux-amd64 | |
make test | |
DOCKER_BUILDKIT=1 make integration_test | |
shellcheck contrib/install.sh | |
- name: Lint | |
run: | | |
test $(go fmt ./... | wc -l) -eq 0 |