diff options
| author | Xe Iaso <me@xeiaso.net> | 2024-06-29 12:40:21 -0400 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2024-06-29 12:40:21 -0400 |
| commit | 120e22a5f2989a2d8fa3d9dba79c6421624686ba (patch) | |
| tree | b5f408e740bf61019a2155558909f4b226f70b7f /.github/workflows/go.yml | |
| parent | 5811951ae0cd92810eee1d6e9f9132ed33a74595 (diff) | |
| download | x-120e22a5f2989a2d8fa3d9dba79c6421624686ba.tar.xz x-120e22a5f2989a2d8fa3d9dba79c6421624686ba.zip | |
add simple pure go CI pass
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to '.github/workflows/go.yml')
| -rw-r--r-- | .github/workflows/go.yml | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..7097348 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,46 @@ +name: Go + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + + - name: Set up Homebrew + uses: Homebrew/actions/setup-homebrew@master + + - name: Setup Homebrew cellar cache + uses: actions/cache@v4 + with: + path: | + /home/linuxbrew/.linuxbrew/Cellar + key: ${{ runner.os }}-homebrew-cellar-${{ hashFiles('Brewfile.lock.json') }} + restore-keys: | + ${{ runner.os }}-homebrew-cellar- + + - name: Install Brew dependencies + run: | + brew bundle + + - name: Setup Golang caches + uses: actions/cache@v4 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-golang- + + - name: Build + run: go build ./... + + - name: Test + run: go test ./...
\ No newline at end of file |
