From ec1744bc23f47569d45b91317055ae85e07a08e2 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Thu, 18 Jan 2024 09:01:54 -0300 Subject: [PATCH] ci: add github actions & dependabot Signed-off-by: Carlos Alexandro Becker --- .github/dependabot.yml | 11 +---------- .github/workflows/build.yml | 22 ++++++++++++++++++++++ .github/workflows/lint.yml | 21 +++++++++++++++++++++ 3 files changed, 44 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/lint.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3081cf0..c0e481b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,7 +7,7 @@ updates: labels: - "dependencies" commit-message: - prefix: "feat" + prefix: "chore" include: "scope" - package-ecosystem: "github-actions" directory: "/" @@ -18,12 +18,3 @@ updates: commit-message: prefix: "chore" include: "scope" - - package-ecosystem: "docker" - directory: "/" - schedule: - interval: "daily" - labels: - - "dependencies" - commit-message: - prefix: "feat" - include: "scope" \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1e42a85 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,22 @@ +name: Build + +on: + push: + pull_request: + +jobs: + build: + uses: charmbracelet/meta/.github/workflows/build.yml@main + + codecov: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "stable" + cache: true + - run: go test -failfast -race -coverpkg=./... -covermode=atomic -coverprofile=coverage.txt ./... -timeout 5m + - uses: codecov/codecov-action@v3 + with: + file: ./coverage.txt diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..3861cb7 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,21 @@ +name: lint +on: + push: + pull_request: + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: ^1 + cache: true + - uses: golangci/golangci-lint-action@v3 + with: + # Optional: golangci-lint command line arguments. + args: --issues-exit-code=0 + # Optional: show only new issues if it's a pull request. The default value is `false`. + only-new-issues: true