Skip to content

Commit

Permalink
feat: update ci configuration (#1580)
Browse files Browse the repository at this point in the history
- Enable all Renovate managers
- Group more CI dependency updates
- Refactor Arduino custom manager to use the general custom_regex one

~
  • Loading branch information
ferrarimarco authored Sep 8, 2024
1 parent f27c4e2 commit 623a6be
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 41 deletions.
33 changes: 10 additions & 23 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,30 @@
]
},
"configMigration": true,
"enabledManagers": [
"ansible",
"ansible-galaxy",
"devcontainer",
"dockerfile",
"docker-compose",
"pip_requirements",
"pre-commit",
"custom.regex"
],
"dependencyDashboardApproval": true,
"extends": ["config:best-practices", ":semanticCommits"],
"forkProcessing": "enabled",
"gitAuthor": "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>",
"labels": ["dependencies"],
"packageRules": [
{
"matchFileNames": ["config/ansible/**/requirements.yml"],
"groupName": "ansible"
"groupName": "ansible-requirements"
},
{
"matchFileNames": ["config/pre-commit/**"],
"matchFileNames": [
"config/pre-commit/**",
".github/**",
"docker/release-please-commitlint/**",
"scripts/run-renovate.sh"
],
"groupName": "ci"
}
],
"pre-commit": {
"enabled": true
},
"customManagers": [
{
"customType": "regex",
"fileMatch": ["^docker/arduino-cli/Dockerfile$"],
"matchStrings": [
"ARG ARDUINO_CLI_VERSION=\"(?<currentValue>\\d+\\.\\d+\\.\\d+)\\S*"
],
"depNameTemplate": "arduino/arduino-cli",
"datasourceTemplate": "github-releases",
"extractVersionTemplate": "^(?<version>.*)$"
},
{
"customType": "regex",
"description": "Update _VERSION variables in Dockerfiles, and shell scripts",
Expand All @@ -57,5 +43,6 @@
"# renovate: datasource=(?<datasource>[a-z-]+?)(?: depName=(?<depName>.+?))? packageName=(?<packageName>.+?)(?: versioning=(?<versioning>[a-z-]+?))?\\s(?:ENV|ARG)?\\s*.+?_VERSION=\"?(?<currentValue>.+?)\"?\\s"
]
}
]
],
"rangeStrategy": "bump"
}
16 changes: 0 additions & 16 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

lint-script:
concurrency:
# Ref: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
# github.head_ref: head_ref or source branch of the pull request
# github.ref: ref of the branch that triggered the workflow
group: ${{ github.workflow }}-lint-script-${{ github.head_ref || github.ref }}-${{ github.event_name }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run lint script
run: |
scripts/lint.sh
pre_commit:
concurrency:
# Ref: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/test-shell-scripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@
name: Test shell scripts

on: # yamllint disable-line rule:truthy
push: null
pull_request: null
push:
paths:
- ".github/workflows/test-shell-scripts.yaml"
- "scripts/**"
- "test/scripts/**"
pull_request:
paths:
- "scripts/common.sh"
- "scripts/run-ansible.sh"

permissions:
contents: read
Expand All @@ -18,6 +25,8 @@ jobs:
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run ${{ matrix.test_script_path }}
run: |
set -o errexit
Expand All @@ -27,4 +36,5 @@ jobs:
strategy:
matrix:
test_script_path:
- scripts/lint.sh
- test/scripts/build-python-venv-test.sh
1 change: 1 addition & 0 deletions docker/arduino-cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM debian:bullseye

SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"]

# renovate: datasource=github-releases packageName=arduino/arduino-cli versioning=semver-coerced
ARG ARDUINO_CLI_VERSION="0.34.2"

RUN apt-get update \
Expand Down

0 comments on commit 623a6be

Please sign in to comment.