33 lines
698 B
YAML
33 lines
698 B
YAML
name: Build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
GOPRIVATE: github.com/kratisto
|
|
GONOSUMDB: "*github.com/kratisto/mangezmieux-backend"
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Configure git for private modules
|
|
env:
|
|
TOKEN: ${{ secrets.GHA_TOKEN_PAT }}
|
|
run: git config --global url."https://YOUR_GITHUB_USERNAME:${TOKEN}@github.com".insteadOf "https://github.com"
|
|
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '1.21'
|
|
|
|
- name: Build
|
|
run: go build -v ./...
|
|
|
|
- name: Test
|
|
run: go test -v ./...
|