mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-25 15:46:28 +08:00
b9ae4ffe9a
* 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 <krahets@163.com>
36 lines
825 B
YAML
36 lines
825 B
YAML
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 ./...
|