From 196490f41ddd65131bb706e80a316edcf01f607e Mon Sep 17 00:00:00 2001 From: "Ian Meyer (imeyer)" Date: Sun, 25 Aug 2024 08:14:55 -0700 Subject: [PATCH] gha: Merge test.yml into build.yml - Makes job dependencies clearer --- .github/workflows/build.yml | 16 ++++++++++++++-- .github/workflows/test.yml | 20 -------------------- 2 files changed, 14 insertions(+), 22 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 83a1005..7ba0e28 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,16 +3,28 @@ run-name: Build & Release on: push jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Check out smart-dns-updater + uses: actions/checkout@v4 + - name: Test //... + run: | + bazelisk test --stamp --workspace_status_command=$PWD/status.sh //... + build: strategy: matrix: goos: [linux, darwin] goarch: [arm64, amd64] runs-on: ubuntu-latest + needs: test steps: - name: Check out smart-dns-updater uses: actions/checkout@v4 - - run: | + - name: Build for smart-dns-updater ${{ matrix.goos }}_${{ matrix.goarch }} + run: | bazelisk build //:smart-dns-updater_${{ matrix.goos }}_${{ matrix.goarch }} - name: Upload artifact uses: actions/upload-artifact@v4 @@ -23,7 +35,7 @@ jobs: release: runs-on: ubuntu-latest - needs: build + needs: [build, test] steps: - name: Release uses: softprops/action-gh-release@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 2ea2169..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Test -run-name: Test -on: - push: - branches: [main] - pull_request: - paths: - - "!README.md" - - "!LICENSE" - -jobs: - test: - name: Test - runs-on: ubuntu-latest - steps: - - name: Check out smart-dns-updater - uses: actions/checkout@v4 - - name: Test //... - run: | - bazelisk test --stamp --workspace_status_command=$PWD/status.sh //...