update tests #289
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run tests | |
on: | |
workflow_dispatch: | |
push: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23 | |
- name: Use Exiftool | |
uses: woss/[email protected] | |
if: matrix.os != 'windows-latest' | |
- name: Install winget | |
uses: Cyberboss/install-winget@v1 | |
if: matrix.os == 'windows-latest' | |
- name: Install Exiftool | |
run: winget install exiftool --disable-interactivity --accept-source-agreements | |
if: matrix.os == 'windows-latest' | |
- name: Set up gotestfmt | |
run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest | |
- name: Run tests | |
run: go test ./... -json -v -race 2>&1 | tee /tmp/gotest.log | gotestfmt | |
# Upload the original go test log as an artifact for later review. | |
- name: Upload test log | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: test-log-${{ matrix.os }} | |
path: /tmp/gotest.log | |
if-no-files-found: error |