Skip to content

Commit

Permalink
Merge fc661ce into 083699c
Browse files Browse the repository at this point in the history
  • Loading branch information
aereal authored Feb 19, 2025
2 parents 083699c + fc661ce commit 9e49edc
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 17 deletions.
50 changes: 34 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,30 @@
name: CI
on:
pull_request:
push:
branches:
- main
jobs:
ok:
if: failure()
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs:
- test
- lint
- test-lint
steps:
- run: exit 1
test:
test-lint:
name: test and lint
strategy:
matrix:
go_version:
- stable
- oldstable
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: read
contents: read
pull-requests: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
id: setup-go
with:
go-version: ${{ matrix.go_version }}
cache: true
Expand All @@ -33,12 +35,28 @@ jobs:
go test -v -race -coverprofile=cover.out ./...
- uses: k1LoW/octocov-action@1ad702b3118b6a055c00b01db68ca0d9f6641dbc # v1.4.0
if: ${{ matrix.go_version == 'stable' }}
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: lint
uses: reviewdog/action-golangci-lint@dd3fda91790ca90e75049e5c767509dc0ec7d99b # v2.7.0
- uses: aquaproj/aqua-installer@e2d0136abcf70b7a2f6f505720640750557c4b33 # v3.1.1
with:
fail_level: warning
filter_mode: nofilter
aqua_version: v2.43.3
- run: aqua install
- name: golangci-lint
env:
_go_version: ${{ steps.setup-go.outputs.go-version }}
run: |
golangci-lint run \
--go "$_go_version" \
--out-format line-number \
--issues-exit-code 0 \
--config .golangci.yml \
1>lint-stdout.txt 2>/dev/stderr
- name: reviewdog
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}
run: |
reviewdog \
-name golangci-lint \
-f golangci-lint \
-filter-mode nofilter \
-reporter github-pr-check \
-fail-level warning \
< lint-stdout.txt
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: release
on:
push:
branches:
- main
jobs:
tagpr:
runs-on: ubuntu-24.04
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
token: ${{ secrets.TAGPR_GITHUB_PAT }}
- uses: aquaproj/aqua-installer@e2d0136abcf70b7a2f6f505720640750557c4b33 # v3.1.1
with:
aqua_version: v2.43.3
- run: aqua install
- name: run tagpr
run: tagpr
env:
GITHUB_TOKEN: ${{ secrets.TAGPR_GITHUB_PAT }}
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ linters:
- protogetter
- reassign
- staticcheck
- tenv
- testableexamples
- testpackage
- thelper
- tparallel
- unused
- usetesting
linters-settings:
errcheck:
check-type-assertions: true
Expand Down
6 changes: 6 additions & 0 deletions .tagpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[tagpr]
vPrefix = true
releaseBranch = main
versionFile = version.txt
release = true
commitPrefix = "chore(tagpr): "
7 changes: 7 additions & 0 deletions aqua-policy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/aquaproj/aqua/main/json-schema/policy.json
registries:
- type: standard
ref: semver(">= 3.0.0")
packages:
- registry: standard
8 changes: 8 additions & 0 deletions aqua.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/aquaproj/aqua/main/json-schema/aqua-yaml.json
registries:
- type: standard
ref: v4.311.0 # renovate: depName=aquaproj/aqua-registry
packages:
- name: golangci/golangci-lint@v1.64.2
- name: reviewdog/reviewdog@v0.20.3
1 change: 1 addition & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v0.3.0

0 comments on commit 9e49edc

Please sign in to comment.