diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8225e89..9b46bb1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,11 +41,38 @@ jobs: name: web-build path: web/build + test: + name: Test + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + needs: web + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Download web production build + uses: actions/download-artifact@v3 + with: + name: web-build + path: web/build + + # 1.20 is the last version to support Windows < 10, Server < 2016, and MacOS < 1.15. + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: '1.20.1' + cache: true + + - name: Test + run: go test -v ./... + goreleaserbuild: name: Build Go binaries if: github.event_name == 'pull_request' runs-on: ubuntu-latest - needs: web + needs: [web, test] steps: - name: Checkout uses: actions/checkout@v3 @@ -84,7 +111,7 @@ jobs: name: Build & publish binaries and images if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest - needs: web + needs: [web, test] steps: - name: Checkout uses: actions/checkout@v3 @@ -122,7 +149,7 @@ jobs: docker: name: Build and publish Docker images runs-on: ubuntu-latest - needs: web + needs: [web, test] steps: - name: Checkout uses: actions/checkout@v3