Create service and project on push #515
Workflow file for this run
This file contains hidden or 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
name: Main | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
build: | |
name: build && tests for ${{ matrix.name }} | |
runs-on: ubuntu-22.04 | |
env: | |
CGO_ENABLED: '0' | |
strategy: | |
matrix: | |
include: | |
- name: linux amd64 | |
env: | |
GOOS: linux | |
GOARCH: amd64 | |
runTests: true | |
- name: linux 386 | |
env: | |
GOOS: linux | |
GOARCH: 386 | |
runTests: false | |
- name: darwin amd64 | |
env: | |
GOOS: darwin | |
GOARCH: amd64 | |
runTests: true | |
- name: darwin arm64 | |
env: | |
GOOS: darwin | |
GOARCH: arm64 | |
runTests: false | |
- name: windows amd64 | |
env: | |
GOOS: windows | |
GOARCH: amd64 | |
runTests: true | |
steps: | |
- name: check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: set up Go 1.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: "go.mod" | |
id: go | |
- name: get dependencies | |
run: | | |
export GOPATH=$HOME/go | |
./tools/install.sh | |
- name: build | |
env: ${{ matrix.env }} | |
run: go build -v ./cmd/... ./src/... | |
- name: test | |
if: ${{ matrix.runTests }} | |
run: env ${{ matrix.osEnv }} go test -v ./cmd/... ./src/... | |
- name: lint | |
run: env ${{ matrix.osEnv }} gomodrun golangci-lint run ./cmd/... ./src/... --verbose |