diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 00000000..7b4efc6e --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,17 @@ +name: pre-commit +on: + pull_request: + push: + branches: [master, dev] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + - uses: actions/setup-go@v3 + - run: go install golang.org/x/tools/cmd/goimports@latest + - run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s - -b $(go env GOPATH)/bin v1.49.0 + - run: echo "PATH=$PATH:/home/runner/go/bin" >> $GITHUB_ENV + - uses: pre-commit/action@v2.0.2