mirror of
https://github.com/GoTestTools/gotestfmt-action.git
synced 2026-02-16 04:31:47 +00:00
Merge pull request #1 from norwd/norwd-patch-1
Extend selftest workflow to multiple runners
This commit is contained in:
commit
29de9b49ea
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:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
name: Self-test
|
name: Self-test
|
||||||
jobs:
|
jobs:
|
||||||
self-test-ubuntu:
|
|
||||||
name: on Ubuntu
|
self-test:
|
||||||
runs-on: ubuntu-latest
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: ['ubuntu', 'macos', 'windows']
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.16
|
go-version: 1.16
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install gotestfmt
|
- name: Install gotestfmt
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
token: ${{ secrets.GH_TOKEN }}
|
||||||
|
|
||||||
- name: Run gotestfmt
|
- name: Run gotestfmt
|
||||||
working-directory: testdata
|
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
|
- name: Upload test log
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: test-log-ubuntu
|
name: test-log-${{ matrix.os }}
|
||||||
path: /tmp/gotest.log
|
path: /tmp/gotest.${{ matrix.os }}.log
|
||||||
if-no-files-found: error
|
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