Skip to content

Fix build

Fix build #3

Workflow file for this run

name: '[CI] Metorial CLI'
on:
pull_request:
push:
branches:
- '**'
tags-ignore:
- 'v*'
jobs:
test:
name: 'Test CLI'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN != '' && secrets.GH_TOKEN || github.token }}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Verify formatting
shell: bash
run: |
unformatted="$(gofmt -l $(find . -name '*.go' -print))"
if [ -n "$unformatted" ]; then
printf 'These files need gofmt:\n%s\n' "$unformatted" >&2
exit 1
fi
- name: Run tests
run: go test ./...
- name: Build CLI
run: go build ./cmd/metorial