Skip to content

Added local dev and release tooling to changelog tool #11

Added local dev and release tooling to changelog tool

Added local dev and release tooling to changelog tool #11

Workflow file for this run

---
name: Changelog generator CI
on:
pull_request:
env:
TOOL_DIRECTORY: tools/changelog
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
# Determine if tests should run
# This is a monorepo and GH checks cannot be required for only specific
# paths, so this is required instead of a trigger `paths` filter.
- name: Check if relavent files have changed
id: changes
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
with:
filters: |
tool:
- 'tools/changelog/**'
- '.github/workflows/changelog-ci.yaml'
# Setup
- name: Checkout repository
if: steps.changes.outputs.tool == 'true'
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup Go
if: steps.changes.outputs.tool == 'true'
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: "${{ env.TOOL_DIRECTORY }}/go.mod"
# Linting
- name: Install golangci-lint
if: steps.changes.outputs.tool == 'true'
run: go install github.com/golangci/golangci-lint/cmd/[email protected]
- name: Lint
if: steps.changes.outputs.tool == 'true'
working-directory: ${{ env.TOOL_DIRECTORY }}
run: make lint
# Tests
- name: Install gotestsum
if: steps.changes.outputs.tool == 'true'
run: go install gotest.tools/[email protected]
- name: Run tests
if: steps.changes.outputs.tool == 'true'
working-directory: ${{ env.TOOL_DIRECTORY }}
run: make test