Skip to content

feat(typescript): support multiple configurable REST resources #282

feat(typescript): support multiple configurable REST resources

feat(typescript): support multiple configurable REST resources #282

name: Go Copier API Build
on:
push:
paths:
- go/**
- .github/workflows/build-go-pipeline.yaml
- .github/actions/setup-copier-template/**
branches:
- main
pull_request:
paths:
- go/**
- .github/workflows/build-go-pipeline.yaml
- .github/actions/setup-copier-template/**
jobs:
build-go:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
template-type:
- go
cloud-service:
- "Azure Function App"
- "GCP Cloud Function"
- "AWS Lambda"
go-version:
- "1.27"
fixture:
- single
include:
- os: ubuntu-latest
template-type: go
cloud-service: "Azure Function App"
go-version: "1.27"
fixture: multi
- os: ubuntu-latest
template-type: go
cloud-service: "GCP Cloud Function"
go-version: "1.27"
fixture: multi
- os: ubuntu-latest
template-type: go
cloud-service: "AWS Lambda"
go-version: "1.27"
fixture: multi
- os: ubuntu-latest
template-type: go
cloud-service: "Azure Function App"
go-version: "1.27"
fixture: edge
- os: ubuntu-latest
template-type: go
cloud-service: "GCP Cloud Function"
go-version: "1.27"
fixture: edge
- os: ubuntu-latest
template-type: go
cloud-service: "AWS Lambda"
go-version: "1.27"
fixture: edge
fail-fast: false
steps:
- name: Check out
uses: actions/checkout@v7
- name: Setup Copier Template
uses: ./.github/actions/setup-copier-template
with:
template-language: ${{ matrix.template-type }}
template-cloud-service: ${{ matrix.cloud-service }}
resources-fixture: ${{ matrix.fixture }}
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v7
with:
go-version: ${{ matrix.go-version }}
- name: Install dependencies
run: make install
working-directory: KittenClaws
- name: Check formatting
run: test -z "$(gofmt -l .)" || { gofmt -l .; exit 1; }
working-directory: KittenClaws
shell: bash
- name: Vet
run: go vet ./...
working-directory: KittenClaws
- name: Build
run: make build
working-directory: KittenClaws
- name: Run lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.14.0
working-directory: KittenClaws
- name: Test with the Go CLI
run: make test-unit
working-directory: KittenClaws
- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
env:
GOTOOLCHAIN: auto
- name: Run dependency vulnerability scan
continue-on-error: true
run: |
set +e
govulncheck ./... 2>&1 | tee audit.log
status=$?
set -e
{
echo "### Go dependency vulnerability scan (${{ matrix.cloud-service }}, ${{ matrix.fixture }})"
echo ""
echo '```'
cat audit.log
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
exit $status
working-directory: KittenClaws
shell: bash