feat(server): create a minimal server #13
This file contains 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
# SPDX-License-Identifier: AGPL-3.0-or-later | |
# | |
# SPDX-FileCopyrightText: 2024 Tristan Partin <tristan@partin.io> | |
name: vacuum | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
paths: | |
- "openapi.yaml" | |
- "vacuum.conf.yaml" | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
go-cache: | |
runs-on: ubuntu-latest | |
outputs: | |
GOCACHE: ${{ steps.gocache.outputs.GOCACHE }} | |
GOMODCACHE: ${{ steps.gomodcache.outputs.GOMODCACHE }} | |
steps: | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
cache: false | |
check-latest: true | |
go-version: "1.22" | |
- name: Get the GOCACHE Environment Variable | |
id: gocache | |
run: | | |
echo "GOCACHE=$(go env GOCACHE)" >> "$GITHUB_OUTPUT" | |
- name: Get the GOMODCACHE Environment Variable | |
id: gomodcache | |
run: | | |
echo "GOMODCACHE=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT" | |
vacuum: | |
runs-on: ubuntu-latest | |
needs: | |
- go-cache | |
env: | |
VACUUM_VERSION: "v0.12.1" | |
steps: | |
- name: Checkout splitsies | |
uses: actions/checkout@v4 | |
- name: Cache Go Modules | |
uses: actions/cache@v4 | |
with: | |
path: | | |
${{ needs.go-cache.outputs.GOCACHE }} | |
${{ needs.go-cache.outputs.GOMODCACHE }} | |
key: ${{ env.VACUUM_VERSION }} | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
cache: false | |
check-latest: true | |
go-version: "1.22" | |
- name: Install vacuum | |
run: | | |
go install "github.com/daveshanley/vacuum@$VACUUM_VERSION" | |
- name: Lint the OpenAPI Description | |
run: | | |
vacuum lint --no-style openapi.yaml |