Skip to content

Commit

Permalink
gha: Merge test.yml into build.yml
Browse files Browse the repository at this point in the history
- Makes job dependencies clearer
  • Loading branch information
imeyer committed Aug 25, 2024
1 parent 50e6f31 commit 196490f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 22 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -23,7 +35,7 @@ jobs:

release:
runs-on: ubuntu-latest
needs: build
needs: [build, test]
steps:
- name: Release
uses: softprops/action-gh-release@v2
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit 196490f

Please sign in to comment.