Skip to content

fix workflow syntax #11

fix workflow syntax

fix workflow syntax #11

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: parse-go-version
run:
echo "version=$(cat go.mod | grep '^go \d*\.\d*$' | awk '{print $2}')" > "${GITHUB_OUTPUT}"
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ steps.parse-go-version.outputs.version }}
- name: Test
run: go test -v ./...