Skip to content

Commit b804674

Browse files
committed
chore: update CI config
1 parent 9dfa726 commit b804674

File tree

7 files changed

+59
-82
lines changed

7 files changed

+59
-82
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/release-drafter.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
# see https://github.com/ansible-community/devtools
2-
_extends: ansible-community/devtools
1+
---
2+
# see https://github.com/ansible/team-devtools
3+
_extends: ansible/team-devtools

.github/workflows/ack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
# See https://github.com/ansible/team-devtools/blob/main/.github/workflows/ack.yml
32
name: ack
43

@@ -13,3 +12,4 @@ on:
1312
jobs:
1413
ack:
1514
uses: ansible/team-devtools/.github/workflows/ack.yml@main
15+
secrets: inherit

.github/workflows/tox.yml

Lines changed: 35 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,44 @@
11
---
22
name: tox
33

4-
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
5-
concurrency:
6-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
7-
cancel-in-progress: true
8-
94
on:
10-
push: # only publishes pushes to the main branch to TestPyPI
11-
branches: # any integration branch but not tag
5+
merge_group:
6+
branches:
7+
- "main"
8+
push:
9+
branches:
1210
- "main"
1311
pull_request:
12+
branches:
13+
- "main"
14+
schedule:
15+
- cron: "0 0 * * *"
16+
workflow_call:
1417

15-
jobs:
16-
pre:
17-
name: pre
18-
runs-on: ubuntu-24.04
19-
outputs:
20-
matrix: ${{ steps.generate_matrix.outputs.matrix }}
21-
steps:
22-
- name: Determine matrix
23-
id: generate_matrix
24-
uses: coactions/dynamic-matrix@v1
25-
with:
26-
min_python: "3.10"
27-
max_python: "3.13"
28-
default_python: "3.13" # used by jobs in other_names
29-
other_names: |
30-
lint
31-
pkg
32-
devel
33-
build:
34-
name: ${{ matrix.name }}
35-
runs-on: ubuntu-24.04
36-
needs: pre
37-
env:
38-
PYTEST_REQPASS: 14
39-
strategy:
40-
fail-fast: false
41-
matrix: ${{ fromJson(needs.pre.outputs.matrix) }}
42-
43-
steps:
44-
- name: Checkout repository
45-
uses: actions/checkout@v4
46-
with:
47-
fetch-depth: 0 # needed by setuptools-scm
48-
49-
- name: Install Python
50-
uses: actions/setup-python@v5
51-
with:
52-
python-version: ${{ matrix.python_version }}
53-
54-
- name: Install dependencies
55-
run: |
56-
python -m pip install -U pip
57-
pip install 'tox>=4.2.3'
58-
59-
- name: Run tox run -e ${{ matrix.passed_name }}
60-
run: |
61-
${{ matrix.PREFIX }} tox run -e ${{ matrix.passed_name }}
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
20+
cancel-in-progress: true
6221

63-
check: # This job does nothing and is only used for the branch protection
64-
if: always()
22+
permissions:
23+
checks: read
24+
contents: read
25+
id-token: write
26+
packages: write
27+
pull-requests: write
6528

66-
needs:
67-
- build
68-
runs-on: ubuntu-24.04
69-
steps:
70-
- name: Decide whether the needed jobs succeeded or failed
71-
uses: re-actors/alls-green@release/v1
72-
with:
73-
jobs: ${{ toJSON(needs) }}
29+
jobs:
30+
tox:
31+
uses: ansible/team-devtools/.github/workflows/tox.yml@main
32+
with:
33+
min_python: "3.10"
34+
max_python: "3.13"
35+
default_python: "3.13" # used by jobs in other_names
36+
skip_explode: "1"
37+
other_names: |
38+
lint
39+
pkg
40+
devel
41+
py310
42+
py311
43+
py312
44+
py313

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,4 @@ patches
138138
*.patch
139139
*.orig
140140
*.rej
141+
.ansible

.pre-commit-config.yaml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
---
22
ci:
3+
# We rely on renovate to update it but there is no way to fully disable it
4+
# https://github.com/pre-commit-ci/issues/issues/83
5+
autoupdate_schedule: quarterly
36
skip:
47
# https://github.com/pre-commit-ci/issues/issues/55
58
- ansible-lint
9+
- renovate-config-validator # container limits
610
exclude: >
711
(?x)^(
812
src/molecule_plugins/_version.py
@@ -11,9 +15,15 @@ default_language_version:
1115
python: python3
1216
minimum_pre_commit_version: 1.14.0
1317
repos:
14-
- repo: https://github.com/pycontribs/mirrors-prettier
18+
- repo: https://github.com/renovatebot/pre-commit-hooks
19+
rev: 41.91.1
20+
hooks:
21+
- id: renovate-config-validator
22+
alias: renovate
23+
args: [--strict]
24+
- repo: https://github.com/rbubley/mirrors-prettier
1525
# keep it before yamllint
16-
rev: "v3.4.2"
26+
rev: v3.6.2
1727
hooks:
1828
- id: prettier
1929
# Temporary excludes so we can gradually normalize the formatting
@@ -32,15 +42,16 @@ repos:
3242
- id: black
3343
language_version: python3
3444
- repo: https://github.com/pre-commit/pre-commit-hooks.git
35-
rev: v4.5.0
45+
rev: v6.0.0
3646
hooks:
3747
- id: end-of-file-fixer
3848
- id: trailing-whitespace
3949
- id: mixed-line-ending
40-
- id: check-byte-order-marker
50+
- id: fix-byte-order-marker
4151
- id: check-executables-have-shebangs
4252
- id: check-merge-conflict
4353
- id: debug-statements
54+
language_version: python3
4455
- repo: https://github.com/astral-sh/ruff-pre-commit
4556
rev: "v0.2.0"
4657
hooks:

renovate.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": ["github>ansible/actions//config/renovate.json"]
4+
}

0 commit comments

Comments
 (0)