From 637f1ccd8d4fdf54d752f95829f3694f3a430600 Mon Sep 17 00:00:00 2001 From: insyri <60794909+insyri@users.noreply.github.com> Date: Sat, 23 Dec 2023 22:19:48 -0500 Subject: [PATCH] Setup CI (first test) --- .github/dependabot.yml | 8 ++++++++ .github/workflows/ci.yml | 23 +++++++++++++++++++++++ .golangci.yml | 15 +++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .golangci.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..37c94c0 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "weekly" + labels: + - "dependency" \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0f48cea --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,23 @@ +name: CI + +on: + push: + pull_request: + +jobs: + Go: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version: 1.21.5 + + - name: Format and Lint + uses: golangci/golangci-lint-action@v3 + with: + version: latest + working-directory: cli + + - name: Build + run: go build diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..b93231c --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,15 @@ +run: + timeout: 3m +issues: + fix: true +linters: + enable: + - dupl + - goconst + - gofmt + - goimports + - misspell + - nilnil + - nosnakecase + - nonamedreturns + - revive \ No newline at end of file