diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 58e941d9..2d05637f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,9 +1,9 @@ name: "Unit Tests" on: + workflow_dispatch: pull_request: - branches: - - main + permissions: contents: write @@ -13,23 +13,22 @@ defaults: jobs: test: - name: Running Unit Tests runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version-file: go.mod - check-latest: true - - - name: Run Tests - run: | - export GOPATH=$HOME/cli-plugin-repo - export PATH=$GOPATH/bin:$PATH - bin/test - env: - BINARY_VALIDATION: false + - name: Checkout Plugin repo + uses: actions/checkout@v4 + + - name: Set Up Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + check-latest: true + + - name: Run Tests + run: | + set -ex + export GOPATH=$PWD/gopath + export PATH=$GOPATH/bin:$PATH + + BINARY_VALIDATION=false bin/test