Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Generate coverage badges
on:
push:
branches: [main]
branches: [v2]

permissions:
contents: write
Expand All @@ -10,7 +10,7 @@ jobs:
generate-badges:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

# setup go environment
- name: Set up Go
Expand All @@ -21,13 +21,14 @@ jobs:
- name: coverage
id: coverage
run: |
go test -coverpkg=./... -coverprofile=profile.cov ./...
# sed -i '/cmd/d' profile.cov # remove cmd package from coverage
go mod download
go generate ./...
go test -coverpkg=./... -coverprofile=profile.cov $(go list ./... | grep -v /cmd/)
total=$(go tool cover -func profile.cov | grep '^total:' | awk '{print $3}' | sed "s/%//")
rm profile.cov
echo "COVERAGE_VALUE=${total}" >> $GITHUB_ENV

- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
repository: sgaunet/gh-action-badge
path: gh-action-badge
Expand Down
33 changes: 17 additions & 16 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
name: linter

on:
pull_request:
push:

permissions:
contents: write
contents: read

jobs:
linter:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: actions/setup-go@v5
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
go-version: stable
- name: Install task
uses: jaxxstorm/action-install-gh-release@v1.12.0
with:
go-version: '>=1.24'
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.12.0
repo: go-task/task
cache: enable
# tag:
- name: Install golangci-lint
uses: jaxxstorm/action-install-gh-release@v1.12.0
with:
enable-cache: true
devbox-version: 0.14.0
repo: golangci/golangci-lint
tag: v2.2.2
cache: enable
binaries-location: golangci-lint-2.2.2-linux-amd64

- name: Install prerequisites
- name: Run linter
shell: /usr/bin/bash {0}
run: |
devbox install
devbox run linter
task linter
20 changes: 12 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,23 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '>=1.24'
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.12.0
- name: Install task
uses: jaxxstorm/action-install-gh-release@v1.12.0
with:
enable-cache: true
devbox-version: 0.14.0
repo: go-task/task
# tag:
- name: Install goreleaser
uses: jaxxstorm/action-install-gh-release@v1.12.0
with:
repo: goreleaser/goreleaser
# tag:

-
# Add support for more platforms with QEMU (optional)
Expand All @@ -45,11 +50,10 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Install prerequisites
- name: Create release
shell: /usr/bin/bash {0}
run: |
devbox install
devbox run release
task release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
Expand Down
27 changes: 16 additions & 11 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
name: snapshot

on:
pull_request:
push:

permissions:
contents: write
contents: read

jobs:
goreleaser-snapshot:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '>=1.24'
- name: Install devbox
uses: jetify-com/devbox-install-action@v0.12.0
- name: Install task
uses: jaxxstorm/action-install-gh-release@v1.12.0
with:
enable-cache: true
devbox-version: 0.14.0

repo: go-task/task
cache: true
# tag:
- name: Install goreleaser
uses: jaxxstorm/action-install-gh-release@v1.12.0
with:
repo: goreleaser/goreleaser
cache: true
# tag:

-
# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
Expand All @@ -42,11 +48,10 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Install prerequisites
- name: Create snapshot release
shell: /usr/bin/bash {0}
run: |
devbox install
devbox run snapshot
task snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
Expand Down
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
dist
gitlab-backup2s3
.task
tst
/dist
/gitlab-backup2s3
/.task
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ linters:

disable:
- wsl
- wsl_v5
- nlreturn
- depguard
- gochecknoinits
Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ tasks:
release:
desc: "Create a release"
cmds:
- GITLAB_TOKEN="" goreleaser --clean --skip validate
- GITLAB_TOKEN="" goreleaser --clean
30 changes: 0 additions & 30 deletions devbox.json

This file was deleted.

129 changes: 0 additions & 129 deletions devbox.lock

This file was deleted.

Loading