Skip to content

fix(deps): update module github.com/knadh/koanf/v2 v2.3.5 → v2.3.6 (#… #1034

fix(deps): update module github.com/knadh/koanf/v2 v2.3.5 → v2.3.6 (#…

fix(deps): update module github.com/knadh/koanf/v2 v2.3.5 → v2.3.6 (#… #1034

name: forgetool-go-tests
on:
workflow_dispatch:
workflow_call:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
check_changes:
runs-on: ubuntu-latest
outputs:
changes_detected: ${{ steps.filter.outputs.changed }}
steps:
- name: Checkout code
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- name: Filter paths
id: filter
uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4
with:
list-files: json
filters: |
changed:
- '**'
test:
runs-on: ubuntu-latest
if: needs.check_changes.outputs.changes_detected == 'true'
needs: check_changes
steps:
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6
with:
go-version: stable
cache: true
cache-dependency-path: |
**/go.mod
**/go.sum
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- name: build
run: |
set -o pipefail
go build -o /tmp/forgetool
- name: run
run: |
set -o pipefail
/tmp/forgetool
- name: Unit Tests
run: |
set -o pipefail
go test -v ./... -race -covermode=atomic -coverprofile=coverage.txt 2>&1 | tee test_output.txt
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: "trueforge-org/forgetool"
- name: Fail on no test files
if: always()
run: |
if [ -f test_output.txt ]; then
if grep -q '\[no test files\]' test_output.txt; then
echo "Found [no test files] in test output" >&2
cat test_output.txt
exit 1
fi
else
echo "test_output.txt not found; skipping no-test-files check"
fi