Skip to content

Add goeql test scaffold #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/test-goeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Test goeql

on:
push:
branches: [ main ]
paths:
- .github/workflows/test-goeql.yml
- languages/go/goeql/**
pull_request:
branches: [ main ]
paths:
- .github/workflows/test-goeql.yml
- languages/go/goeql/**

jobs:

test:
name: Run test suite
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: languages/go/goeql/go.mod
cache-dependency-path: |
languages/go/goeql/go.mod

- name: Get dependencies
run: |
go get -v -t -d ./...
make cidep
working-directory: languages/go/goeql/

- name: Test
run: |
make test
working-directory: languages/go/goeql/
Empty file.
16 changes: 16 additions & 0 deletions languages/go/goeql/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
all: test

test: gotest goerrcheck gostaticcheck

cidep:
go install honnef.co/go/tools/cmd/staticcheck@latest
go install github.com/kisielk/errcheck@latest

gotest:
go test ./... -v -timeout=45s -failfast

goerrcheck:
errcheck -exclude .errcheck-excludes -ignoretests ./...

gostaticcheck:
staticcheck ./...