Skip to content

standardize workflows for build-resources v4 #267

standardize workflows for build-resources v4

standardize workflows for build-resources v4 #267

name: Go test windows
on:
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
permissions: {}
jobs:
go-test-windows:
name: "Go test with OS: windows-latest; Go: ${{ matrix.go }}"
permissions:
contents: read
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
go: ["1.24"]
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Setup go ${{ matrix.go }}
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
- name: Set up gotestfmt
uses: gotesttools/gotestfmt-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run go test
run: |
go test -json -v -p 1 -coverprofile=cover -covermode=atomic -coverpkg=./... ./... 2>&1 | tee "C:\Temp\gotest.log" | gotestfmt
cp cover cover.out
- name: Store coverage file
uses: actions/upload-artifact@v6
with:
name: cover.out
path: cover.out
- name: Upload test log
uses: actions/upload-artifact@v6
if: always()
with:
name: test-log
path: "C:\\Temp\\gotest.log"
if-no-files-found: error
coverage:
name: Coverage
needs: go-test-windows
permissions:
contents: read
uses: senzing-factory/build-resources/.github/workflows/go-coverage.yaml@v4
with:
coverage-config: ./.github/coverage/testcoverage.yaml