diff --git a/.github/workflows/goimports.yml b/.github/workflows/goimports.yml new file mode 100644 index 00000000..e7f15b94 --- /dev/null +++ b/.github/workflows/goimports.yml @@ -0,0 +1,16 @@ +name: Check imports +on: [ push, pull_request ] +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v2 + with: + go-version: '1.17' + - uses: actions/checkout@master + - name: Check imports + shell: bash + run: | + export PATH=$(go env GOPATH)/bin:$PATH + go get golang.org/x/tools/cmd/goimports + diff -u <(echo -n) <(goimports -d .) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..81c82c26 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,14 @@ +--- +name: Run tests +on: [ push, pull_request ] +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v2 + with: + go-version: '1.17' + - uses: actions/checkout@master + - name: Run tests + run: | + make test