Skip to content

fix(deps): update ghcr.io/siderolabs/installer docker tag v1.12.4 → v1.12.6 #745

fix(deps): update ghcr.io/siderolabs/installer docker tag v1.12.4 → v1.12.6

fix(deps): update ghcr.io/siderolabs/installer docker tag v1.12.4 → v1.12.6 #745

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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Filter paths
id: filter
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
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@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
with:
go-version: stable
cache: true
cache-dependency-path: |
**/go.mod
**/go.sum
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 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@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
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