Skip to content

Redirect toolhive slog singleton to log file #31

Redirect toolhive slog singleton to log file

Redirect toolhive slog singleton to log file #31

Workflow file for this run

# SPDX-FileCopyrightText: Copyright 2025 Stacklok, Inc.
# SPDX-License-Identifier: Apache-2.0
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
env:
GOPRIVATE: github.com/stacklok/*
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Configure Git for private modules
run: |
git config --global url."https://${{ github.actor }}:${{ secrets.GO_MODULE_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Install Task
uses: go-task/setup-task@v1
- name: Build apiary-init (for go:embed)
run: task build-init
- name: Run tests
run: task test
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Configure Git for private modules
run: |
git config --global url."https://${{ github.actor }}:${{ secrets.GO_MODULE_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Install Task
uses: go-task/setup-task@v1
- name: Install golangci-lint
uses: golangci/golangci-lint-action@v9
with:
install-only: true
- name: Build apiary-init (for go:embed)
run: task build-init
- name: Run linter
run: task lint
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Configure Git for private modules
run: |
git config --global url."https://${{ github.actor }}:${{ secrets.GO_MODULE_TOKEN }}@github.com/".insteadOf "https://github.com/"
- name: Install Task
uses: go-task/setup-task@v1
- name: Build
run: task build