Skip to content

Commit 82652e8

Browse files
authored
GHA maintenance (#4132)
1 parent b21aa8a commit 82652e8

7 files changed

Lines changed: 40 additions & 45 deletions

File tree

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @ansible-community/molecule @ansible-community/devtools
1+
* @ansible/devtools

.github/release-drafter.yml

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

.github/workflows/ack.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
---
2-
# See https://github.com/ansible/devtools/blob/main/.github/workflows/ack.yml
1+
# See https://github.com/ansible/team-devtools/blob/main/.github/workflows/ack.yml
32
name: ack
3+
4+
concurrency:
5+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
6+
cancel-in-progress: true
7+
48
on:
59
pull_request_target:
610
types: [opened, labeled, unlabeled, synchronize]
711

812
jobs:
913
ack:
10-
uses: ansible/devtools/.github/workflows/ack.yml@main
14+
uses: ansible/team-devtools/.github/workflows/ack.yml@main

.github/workflows/push.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
---
2-
# See https://github.com/ansible/devtools/blob/main/.github/workflows/push.yml
1+
# See https://github.com/ansible/team-devtools/blob/main/.github/workflows/push.yml
32
name: push
43
on:
54
push:
@@ -10,4 +9,4 @@ on:
109

1110
jobs:
1211
ack:
13-
uses: ansible/devtools/.github/workflows/push.yml@main
12+
uses: ansible/team-devtools/.github/workflows/push.yml@main

.github/workflows/release.yml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
---
2-
# cspell:ignore mislav
31
name: release
42

53
on:
@@ -8,36 +6,29 @@ on:
86

97
jobs:
108
pypi:
11-
name: Publish to PyPI registry
9+
name: release ${{ github.event.ref }}
1210
environment: release
1311
runs-on: ubuntu-22.04
12+
permissions:
13+
id-token: write
1414

1515
env:
1616
FORCE_COLOR: 1
1717
PY_COLORS: 1
18-
TOXENV: pkg
18+
TOX_PARALLEL_NO_SPINNER: 1
1919

2020
steps:
21-
- name: Switch to using Python 3.10 by default
21+
- name: Switch to using Python 3.12 by default
2222
uses: actions/setup-python@v5
2323
with:
24-
python-version: 3.10
25-
24+
python-version: "3.12"
2625
- name: Install tox
2726
run: python3 -m pip install --user "tox>=4.0.0"
28-
2927
- name: Check out src from Git
3028
uses: actions/checkout@v4
3129
with:
3230
fetch-depth: 0 # needed by setuptools-scm
33-
submodules: true
34-
3531
- name: Build dists
36-
run: python -m tox
37-
32+
run: python -m tox -e pkg
3833
- name: Publish to pypi.org
39-
if: >- # "create" workflows run separately from "push" & "pull_request"
40-
github.event_name == 'release'
4134
uses: pypa/gh-action-pypi-publish@release/v1
42-
with:
43-
password: ${{ secrets.pypi_password }}

.github/workflows/tox.yml

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
---
22
name: tox
33

4+
concurrency:
5+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
6+
cancel-in-progress: true
7+
48
on:
59
push: # only publishes pushes to the main branch to TestPyPI
610
branches: # any integration branch but not tag
711
- "main"
812
pull_request:
9-
branches:
10-
- "main"
11-
12-
concurrency:
13-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
14-
cancel-in-progress: true
15-
16-
env:
17-
FORCE_COLOR: 1 # tox, pytest, ansible-lint
18-
PY_COLORS: 1
13+
workflow_call:
1914

2015
jobs:
2116
pre:
@@ -111,13 +106,20 @@ jobs:
111106
# produce a single .coverage file at repo root
112107
run: tox -e coverage
113108

109+
- name: Archive logs
110+
uses: actions/upload-artifact@v4
111+
with:
112+
name: logs-${{ matrix.name }}.zip
113+
path: .tox/**/log/
114+
114115
- name: Upload coverage data
115116
if: ${{ startsWith(matrix.passed_name, 'py') }}
116117
uses: codecov/codecov-action@v4
117118
with:
118-
name: ${{ matrix.passed_name }}
119+
name: ${{ matrix.name }}
119120
token: ${{ secrets.CODECOV_TOKEN }}
120-
verbose: true # optional (default = false)
121+
verbose: true
122+
fail_ci_if_error: true
121123

122124
- name: Report failure if git reports dirty status
123125
run: |
@@ -133,10 +135,14 @@ jobs:
133135

134136
needs:
135137
- build
136-
137138
runs-on: ubuntu-latest
138-
139139
steps:
140+
- name: Merge logs into a single archive
141+
uses: actions/upload-artifact/merge@v4
142+
with:
143+
name: logs.zip
144+
pattern: logs-*.zip
145+
delete-merged: true
140146
- name: Decide whether the needed jobs succeeded or failed
141147
uses: re-actors/alls-green@release/v1
142148
with:

codecov.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
codecov:
2-
require_ci_to_pass: true
31
comment: false
42
coverage:
53
status:
6-
patch: false
7-
project:
8-
default:
9-
threshold: 0.5%
4+
patch: true # we want github annotations

0 commit comments

Comments
 (0)