mirror of
https://github.com/GoTestTools/gotestfmt-action.git
synced 2026-02-09 09:17:29 +00:00
Extend selftest workflow to multiple runners
This should help catch errors like #4 and #8 by ensuring that gotestfmt can run on all the major OS runners for GitHub Actions. Signed-off-by: Yuri Norwood <106889957+norwd@users.noreply.github.com>
This commit is contained in:
parent
65f1d2228f
commit
4e7133828b
1 changed files with 17 additions and 30 deletions
47
.github/workflows/selftest.yml
vendored
47
.github/workflows/selftest.yml
vendored
|
|
@ -1,52 +1,39 @@
|
|||
on:
|
||||
pull_request:
|
||||
|
||||
name: Self-test
|
||||
jobs:
|
||||
self-test-ubuntu:
|
||||
name: on Ubuntu
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
self-test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: ['ubuntu', 'macos', 'windows']
|
||||
|
||||
runs-on: ${{ matrix.os }}-latest
|
||||
steps:
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install gotestfmt
|
||||
uses: ./
|
||||
with:
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- name: Run gotestfmt
|
||||
working-directory: testdata
|
||||
run: go test -json -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
|
||||
run: go test -json -v ./... 2>&1 | tee /tmp/gotest.${{ matrix.os }}.log | gotestfmt
|
||||
|
||||
- name: Upload test log
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: test-log-ubuntu
|
||||
path: /tmp/gotest.log
|
||||
name: test-log-${{ matrix.os }}
|
||||
path: /tmp/gotest.${{ matrix.os }}.log
|
||||
if-no-files-found: error
|
||||
self-test-macos:
|
||||
name: on MacOS
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Install gotestfmt
|
||||
uses: ./
|
||||
with:
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
- name: Run gotestfmt
|
||||
working-directory: testdata
|
||||
run: go test -json -v ./... 2>&1 | tee ./gotest.log | gotestfmt
|
||||
- name: Upload test log
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: test-log-macos
|
||||
path: ./testdata/gotest.log
|
||||
if-no-files-found: error
|
||||
Loading…
Reference in a new issue