Skip to content

Fix sdo_writer

Fix sdo_writer #26

Workflow file for this run

name: go - ci
on:
pull_request:
branches: [ "main" ]
push:
branches: [ "main" ]
workflow_dispatch:
jobs:
build-test:
runs-on: [ ubuntu-latest ]
outputs:
go-version: ${{ steps.setup-go.outputs.go-version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
id: setup-go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Setup gotestsum
run: go install gotest.tools/gotestsum@latest
- name: Test
run: gotestsum --format testname --junitfile report.xml -- -tags=skip ./...
- name: Publish test results
uses: actions/upload-artifact@v4
with:
name: test-results
path: report.xml
- name: Annotate test results
if: ${{ ! cancelled() }}
uses: dorny/test-reporter@v1
with:
name: go tests
path: report.xml
reporter: java-junit
check:
runs-on: [ ubuntu-latest ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Static-Check
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
staticcheck ./...
- name: Dependency-Update-Check
if: github.ref != 'refs/heads/main'
run: |
go get -u ./...
go mod tidy
if git diff --quiet -- go.mod go.sum
then
echo Project dependencies are up to date.
else
echo Project dependencies are outdatet.
echo Run \'go get -u ./... && go mod tidy\' to update project dependecies.
exit 1
fi
- name: Misspell-Check
run: |
go install github.com/client9/misspell/cmd/misspell@latest
find . -type f -name '*.go' | xargs misspell -error
- name: Vulnerability-Check
if: github.ref != 'refs/heads/main'
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...
- name: Install go-licenses
run: go install github.com/google/go-licenses@latest