Skip to content

chore: add workflow #10

chore: add workflow

chore: add workflow #10

Workflow file for this run

name: go
on:
push:
branches:
- master
pull_request:
permissions:
contents: read
env:
GOPRIVATE: github.com/NextronSystems/
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- name: Configure Git credentials for private modules
run: |
git config --global url."https://${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set Go environment for private modules
run: |
echo "GOPRIVATE=github.com/NextronSystems/*" >> $GITHUB_ENV
- name: Test
run: go test -v ./...
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- name: Lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.1.16