forked from krahets/hello-algo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: add auto-build-and-test workflow for go (krahets#1019)
* fix(csharp): unified array statement * feature: add workflow for go/js/ts/zig * fix python UnicodeDecodeError on windows * Update space_complexity.go * Update space_complexity_test.go * Update space_complexity.go * remove nodejs, zip workflow --------- Co-authored-by: Yudong Jin <[email protected]>
- Loading branch information
Showing
4 changed files
with
51 additions
and
35 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,36 @@ | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
paths: ["codes/go/**/*.go"] | ||
pull_request: | ||
branches: [ "main" ] | ||
paths: ["codes/go/**/*.go"] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Go ${{ matrix.go-version }} on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
working-directory: codes/go/ | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
go-version: ["1.19.x"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Go ${{ matrix.go-version }} | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Check out code into the Go module directory | ||
run: go get -v -t -d ./... | ||
- name: Build | ||
run: go build -v ./... | ||
- name: Test with Go | ||
run: go test -v ./... |
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
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
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