-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c87719
commit 2a3ced3
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Go Continuous Integration | ||
#from chatGPT | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
name: Build and Test | ||
runs-on: macos-latest | ||
strategy: | ||
matrix: | ||
go-version: [1.21.6] | ||
arch: [arm64] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Ensures history for all branches is fetched | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Set up environment | ||
run: | | ||
echo "GOOS=darwin" >> $GITHUB_ENV | ||
echo "GOARCH=${{ matrix.arch }}" >> $GITHUB_ENV | ||
- name: Check Go version | ||
run: go version | ||
|
||
- name: Get dependencies | ||
run: go mod tidy | ||
|
||
- name: Build | ||
run: go build -v ./... | ||
|
||
- name: Test | ||
run: go test -v ./... |