Skip to content

Update spec/ to mina-sdk-spec v0.1.2 (#9) #33

Update spec/ to mina-sdk-spec v0.1.2 (#9)

Update spec/ to mina-sdk-spec v0.1.2 (#9) #33

Workflow file for this run

name: CI
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
- name: Vet
run: go vet ./...
- name: Format check
run: |
unformatted=$(gofmt -l .)
if [ -n "$unformatted" ]; then
echo "Unformatted files:"
echo "$unformatted"
exit 1
fi
spec:
name: Specification copy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Read spec/VERSION
id: spec
run: echo "version=$(cat spec/VERSION)" >> "$GITHUB_OUTPUT"
- name: Check out mina-sdk-spec at that tag
uses: actions/checkout@v4
with:
repository: o1-labs/mina-sdk-spec
ref: ${{ steps.spec.outputs.version }}
path: .mina-sdk-spec
- name: Check that spec/ is the tag's copy
run: .mina-sdk-spec/scripts/sync.sh --check .
test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.21", "1.22", "1.23"]
steps:
- uses: actions/checkout@v4
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Run unit tests with coverage
run: go test -v -count=1 -race -coverprofile=coverage.out -covermode=atomic ./...
- name: Coverage report
if: matrix.go-version == '1.23'
run: go tool cover -func=coverage.out
- name: Upload coverage
if: matrix.go-version == '1.23'
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.out
build:
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: Build
run: go build ./...