diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 9d82564e..dec51c58 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -52,7 +52,6 @@ jobs: test_go: name: Run Go Tests runs-on: ${{ matrix.os }} - if: github.event.review.state == 'approved' strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] @@ -71,14 +70,26 @@ jobs: with: go-version: ${{ matrix.go-version }} - - name: Run tests (mac) - if: matrix.os == 'macos-latest' + - name: Run tests (mac) | v2 + if: ${{ matrix.os == 'macos-latest' && github.base_ref == 'master' }} env: CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13 working-directory: ./v2 run: go test -v ./... - - name: Run tests (!mac) - if: matrix.os != 'macos-latest' - working-directory: ./v2 + - name: Run tests (!mac) | v2 + if: ${{ matrix.os != 'macos-latest' && github.base_ref == 'master' }} + working-directory: ./v2 + run: go test -v ./... + + - name: Run tests (mac) | v3 + if: ${{ matrix.os == 'macos-latest' && github.base_ref == 'v3-alpha' }} + env: + CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13 + working-directory: ./v3 + run: go test -v ./... + + - name: Run tests (!mac) | v3 + if: ${{ matrix.os != 'macos-latest' && github.base_ref == 'v3-alpha' }} + working-directory: ./v3 run: go test -v ./...