Skip to content

Commit

Permalink
Create go.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
autodidaddict authored Dec 20, 2023
1 parent da31483 commit d237d1a
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'

- name: Build nex-node
working-directory: ./nex-node/cmd/nex-node
run: go build -tags netgo -ldflags '-extldflags "-static"'
- name: Build nex-agent
working-directory: ./nex-agent/cmd/nex-agent
run: go build -tags netgo -ldflags '-extldflags "-static"'
- name: Build nex-cli
working-directory: ./nex-cli/cmd/nex
run: go build -tags netgo -ldflags '-extldflags "-static"'

- name: Test nex-node
working-directory: ./nex-node
run: go test -v ./...
- name: Test nex-agent
working-directory: ./nex-agent
run: go test -v ./...
- name: Test nex-cli
working-directory: ./nex-cli
run: go test -v ./...

0 comments on commit d237d1a

Please sign in to comment.