feat(go): add tonnes of knobs #444
Workflow file for this run
This file contains hidden or 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: | |
branches: | |
- master | |
pull_request: | |
permissions: {} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
version: [lts/*, .nvmrc] | |
name: Tests (Node.js ${{ matrix.version }}) | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read # clone the repository | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
# We start the backend service while we install dependencies. | |
# We'll wait on it when we are about to start the actual tests. | |
- working-directory: devenv/docker/test | |
run: docker compose up -d | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ (matrix.version != '.nvmrc' && matrix.version) || '' }} | |
node-version-file: ${{ (matrix.version == '.nvmrc' && matrix.version) || '' }} | |
- run: yarn install --frozen-lockfile | |
# Time to wait for Grafana to be ready, if it isn't already. (It probably is, but we can be sure for practically free...) | |
- working-directory: devenv/docker/test | |
run: docker compose up -d --wait | |
- run: yarn run test-ci | |
env: | |
GRAFANA_DOMAIN: localhost | |
eslint: | |
name: ESLint | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read # clone the repository | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- run: yarn install --frozen-lockfile | |
- run: yarn run eslint | |
typecheck: | |
name: Typecheck | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read # clone the repository | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- run: yarn install --frozen-lockfile | |
- run: yarn run typecheck | |
prettier: | |
name: Prettier | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read # clone the repository | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- run: yarn install --frozen-lockfile | |
- run: yarn run prettier:check | |
go-test: | |
name: go test | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read # clone the repository | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- run: go test -buildvcs ./... | |
go-fmt: | |
name: go fmt | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read # clone the repository | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- run: go tool goimports -l . | |
go-mod-tidy: | |
name: go mod tidy | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read # clone the repository | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- run: go mod tidy -diff | |
golangci-lint: | |
name: golangci-lint | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read # clone the repository | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8 |