From 7ab20081360211c4faff6546c774a0c45534d874 Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Sat, 2 Jan 2021 18:28:03 -0500 Subject: [PATCH] .github/workflows: extend testing matrix --- .github/workflows/interop.yml | 1 + .github/workflows/test.yml | 24 ++++++++++++++++++------ cmd/age/age_test.go | 3 ++- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/workflows/interop.yml b/.github/workflows/interop.yml index 7ca9228..f9afa50 100644 --- a/.github/workflows/interop.yml +++ b/.github/workflows/interop.yml @@ -2,6 +2,7 @@ name: Interoperability tests on: push jobs: trigger: + name: Trigger runs-on: ubuntu-latest steps: - name: Trigger interoperability tests in str4d/rage diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 760dc90..7c86aee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,10 +1,22 @@ -name: Go tests on: [push, pull_request] +name: Go tests jobs: test: - runs-on: ubuntu-latest + name: Test + strategy: + fail-fast: false + matrix: + go: [1.14.x, 1.x] + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} steps: - - uses: actions/setup-go@v2 - with: { go-version: 1.x } - - uses: actions/checkout@v2 - - run: go test -race ./... + - name: Install Go ${{ matrix.go }} + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go }} + - name: Checkout repository + uses: actions/checkout@v2 + # - name: Run analyses + # run: go run analysis.go ./... + - name: Run tests + run: go test -race ./... diff --git a/cmd/age/age_test.go b/cmd/age/age_test.go index 2a29b51..ddbcaf8 100644 --- a/cmd/age/age_test.go +++ b/cmd/age/age_test.go @@ -19,7 +19,8 @@ import ( func TestVectors(t *testing.T) { files, _ := filepath.Glob("testdata/*.age") for _, f := range files { - name := strings.TrimSuffix(strings.TrimPrefix(f, "testdata/"), ".age") + _, name := filepath.Split(f) + name = strings.TrimSuffix(name, ".age") expectFailure := strings.HasPrefix(name, "fail_") t.Run(name, func(t *testing.T) { var identities []age.Identity