Skip to content

Merge pull request #4 from quantcli/ci/auto-assign-pr-native #8

Merge pull request #4 from quantcli/ci/auto-assign-pr-native

Merge pull request #4 from quantcli/ci/auto-assign-pr-native #8

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
markdown-lint:
name: markdown lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DavidAnson/markdownlint-cli2-action@v16
with:
globs: '**/*.md'
go:
name: go vet + test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: detect
name: detect go module
run: |
if [ -f go.mod ]; then
echo "has_go=true" >> "$GITHUB_OUTPUT"
else
echo "has_go=false" >> "$GITHUB_OUTPUT"
echo "::notice::No go.mod present; skipping go vet and go test."
fi
- uses: actions/setup-go@v5
if: steps.detect.outputs.has_go == 'true'
with:
go-version-file: go.mod
cache: true
- name: go vet
if: steps.detect.outputs.has_go == 'true'
run: go vet ./...
- name: go test
if: steps.detect.outputs.has_go == 'true'
run: go test ./...