Skip to content

Commit

Permalink
Merge pull request #5 from gqlgo/add-testing-workflow
Browse files Browse the repository at this point in the history
Add workflow
  • Loading branch information
tenntenn authored Apr 8, 2021
2 parents 3b60aa9 + 3c324d5 commit 9343137
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 3 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Test

on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types:
- published
- created
- edited

defaults:
run:
shell: bash

jobs:
test:
runs-on: ubuntu-20.04

steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16.x

- name: Checkout code
uses: actions/checkout@v2

- name: Cache Go module and build cache
uses: actions/cache@v2
with:
key: go-${{ hashFiles('**/go.sum') }}
path: |
~/go/pkg/mod
restore-keys: |
go-
- name: Install tennvet
run: |
GOBIN=$(pwd) go install github.com/tenntenn/tennvet@latest
- name: Test and vet
run: |
go vet ./...
go vet -vettool=$(pwd)/tennvet ./...
go test -v -race ./...
6 changes: 3 additions & 3 deletions cmd/lackid/main.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package main

import (
"github.com/gqlgo/gqlanalysis/multichecker"
"github.com/gqlgo/lackid"
"github.com/gqlgo/gqlanalysis/multichecker"
"github.com/gqlgo/lackid"
)

func main() {
multichecker.Main(
multichecker.Main(
lackid.Analyzer,
)
}

0 comments on commit 9343137

Please sign in to comment.