Skip to content

Commit

Permalink
ci: optimise workflows and renovate setup (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcbinz authored May 2, 2024
1 parent b374fa3 commit bd8e454
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 71 deletions.
37 changes: 14 additions & 23 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,46 +1,37 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"timezone": "Europe/Berlin",
"labels": ["cc | build"],
"packageRules": [
{
"matchPackagePatterns": ["github-actions"],
"matchPackagePatterns": ["action"],
"groupName": "workflow updates",
"commitMessage": "ci: apply workflow version updates",
"commitMessage": "ci: apply workflow updates",
"labels": ["cc | ci"],
"schedule": ["after 7am before 9am"]
"schedule": ["after 7am before 9am on Monday"]
},
{
"matchDatasources": ["golang-version"],
"groupName": "go version update",
"labels": ["cc | build"],
"commitMessage": "build: update go version {{{commitMessageExtra}}}",
"schedule": ["after 7am before 9am"]
"labels": ["cc | test"],
"commitMessage": "build(go): update language version {{{commitMessageExtra}}}",
"schedule": ["after 7am before 9am on Monday"]
},
{
"matchDatasources": ["go"],
"matchUpdateTypes": ["major"],
"stabilityDays": 3,
"groupName": "go major package updates",
"commitMessage": "build: apply major go package updates",
"labels": ["cc | build"],
"schedule": ["after 7am before 9am"]
},
{
"matchDatasources": ["go"],
"matchUpdateTypes": ["minor", "patch"],
"matchUpdateTypes": ["minor", "patch", "pin", "pinDigest", "digest", "lockFileMaintenance", "rollback", "bump"],
"groupName": "go minor/patch package updates",
"commitMessage": "build: apply minor/patch go package updates",
"commitMessage": "build(go): apply minor/patch package updates",
"labels": ["cc | build"],
"schedule": ["after 7am before 9am"]
"schedule": ["after 7am before 9am on Monday"]
},
{
"matchDatasources": ["go"],
"matchUpdateTypes": ["pin", "pinDigest", "digest", "lockFileMaintenance", "rollback", "bump"],
"groupName": "go other package updates",
"commitMessage": "build: apply other go package updates",
"matchUpdateTypes": ["major"],
"minimumReleaseAge": "3 days",
"groupName": "go major package updates",
"commitMessage": "build(go): apply major package updates",
"labels": ["cc | build"],
"schedule": ["after 7am before 9am on saturday"]
"schedule": ["after 7am before 9am on Monday"]
}
],
"additionalReviewers": ["marcbinz"],
Expand Down
48 changes: 0 additions & 48 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,6 @@ jobs:
- name: Check Go Version
run: go version

- name: Cache Go Modules
uses: actions/cache@v3
env:
cache-name: cache-go-modules
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Sync
working-directory: .
run: go mod download
Expand Down Expand Up @@ -91,18 +79,6 @@ jobs:
- name: Check Go Version
run: go version

- name: Cache Go Modules
uses: actions/cache@v3
env:
cache-name: cache-go-modules
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
Expand Down Expand Up @@ -141,18 +117,6 @@ jobs:
- name: Check Go Version
run: go version

- name: Cache Go Modules
uses: actions/cache@v3
env:
cache-name: cache-go-modules
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Build
working-directory: cmd/somgen
run: go build -v ./...
Expand Down Expand Up @@ -181,18 +145,6 @@ jobs:
- name: Check Go Version
run: go version

- name: Cache Go Modules
uses: actions/cache@v3
env:
cache-name: cache-go-modules
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Test Library
working-directory: .
run: go test -v ./...
Expand Down

0 comments on commit bd8e454

Please sign in to comment.