Skip to content

Commit 7b09870

Browse files
authored
chore: add missing shared CI workflows (#88)
* chore: add missing shared CI workflows * chore: point publish workflows to OpenVoiceOS/gh-automations@dev * chore: remove legacy workflows superseded by shared callers * chore: modernize packaging to pyproject.toml
1 parent 378ff17 commit 7b09870

24 files changed

Lines changed: 209 additions & 408 deletions

.github/workflows/build-tests.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Build Tests
2+
3+
on:
4+
pull_request:
5+
branches: [dev, master, main]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
uses: OpenVoiceOS/gh-automations/.github/workflows/build-tests.yml@dev
11+
secrets: inherit
12+
with:
13+
python_versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
14+
install_extras: 'test'
15+
test_path: 'test'

.github/workflows/build_tests.yml

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

.github/workflows/coverage.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Code Coverage
2+
3+
on:
4+
pull_request:
5+
branches: [dev]
6+
workflow_dispatch:
7+
8+
jobs:
9+
coverage:
10+
uses: OpenVoiceOS/gh-automations/.github/workflows/coverage.yml@dev
11+
secrets: inherit
12+
with:
13+
python_version: '3.11'
14+
coverage_source: 'ovos_PHAL'
15+
test_path: 'test/'
16+
install_extras: '.[test]'
17+
min_coverage: 0
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: License Check
2+
3+
on:
4+
pull_request:
5+
branches: [dev]
6+
workflow_dispatch:
7+
8+
jobs:
9+
license_check:
10+
uses: OpenVoiceOS/gh-automations/.github/workflows/license-check.yml@dev
11+
secrets: inherit

.github/workflows/license_tests.yml

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

.github/workflows/lint.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
branches: [dev, master, main]
6+
workflow_dispatch:
7+
8+
jobs:
9+
lint:
10+
uses: OpenVoiceOS/gh-automations/.github/workflows/lint.yml@dev
11+
secrets: inherit
12+
with:
13+
ruff: true
14+
pre_commit: false

.github/workflows/opm-check.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: OPM Plugin Check
2+
3+
on:
4+
pull_request:
5+
branches: [dev, master, main]
6+
workflow_dispatch:
7+
8+
jobs:
9+
opm_check:
10+
uses: OpenVoiceOS/gh-automations/.github/workflows/opm-check.yml@dev
11+
secrets: inherit
12+
with:
13+
python_version: '3.11'
14+
plugin_type: 'auto'

.github/workflows/pip_audit.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: PIP Audit
2+
3+
on:
4+
pull_request:
5+
branches: [dev]
6+
workflow_dispatch:
7+
8+
jobs:
9+
pip_audit:
10+
uses: OpenVoiceOS/gh-automations/.github/workflows/pip-audit.yml@dev
11+
secrets: inherit
Lines changed: 15 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,23 @@
1-
name: Stable Release
1+
name: Publish Stable Release
2+
23
on:
3-
push:
4-
branches: [master]
54
workflow_dispatch:
5+
push:
6+
branches: [master, main]
7+
8+
permissions:
9+
contents: write
610

711
jobs:
812
publish_stable:
9-
uses: TigreGotico/gh-automations/.github/workflows/publish-stable.yml@master
10-
secrets: inherit
13+
if: github.actor != 'github-actions[bot]'
14+
uses: OpenVoiceOS/gh-automations/.github/workflows/publish-stable.yml@dev
15+
secrets:
16+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
17+
MATRIX_TOKEN: ${{ secrets.MATRIX_TOKEN }}
1118
with:
12-
branch: 'master'
1319
version_file: 'ovos_PHAL/version.py'
14-
setup_py: 'setup.py'
20+
publish_pypi: true
1521
publish_release: true
16-
17-
publish_pypi:
18-
needs: publish_stable
19-
if: success() # Ensure this job only runs if the previous job succeeds
20-
runs-on: ubuntu-latest
21-
steps:
22-
- uses: actions/checkout@v6
23-
with:
24-
ref: master
25-
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
26-
- name: Setup Python
27-
uses: actions/setup-python@v6
28-
with:
29-
python-version: "3.11"
30-
- name: Install Build Tools
31-
run: |
32-
python -m pip install build wheel
33-
- name: version
34-
run: echo "::set-output name=version::$(python setup.py --version)"
35-
id: version
36-
- name: Build Distribution Packages
37-
run: |
38-
python setup.py sdist bdist_wheel
39-
- name: Publish to PyPI
40-
uses: pypa/gh-action-pypi-publish@master
41-
with:
42-
password: ${{secrets.PYPI_TOKEN}}
43-
44-
45-
sync_dev:
46-
needs: publish_stable
47-
if: success() # Ensure this job only runs if the previous job succeeds
48-
runs-on: ubuntu-latest
49-
steps:
50-
- uses: actions/checkout@v6
51-
with:
52-
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
53-
ref: master
54-
- name: Push master -> dev
55-
uses: ad-m/github-push-action@master
56-
with:
57-
github_token: ${{ secrets.GITHUB_TOKEN }}
58-
branch: dev
22+
sync_dev: true
23+
notify_matrix: true
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Release Preview
2+
3+
on:
4+
pull_request:
5+
branches: [dev]
6+
workflow_dispatch:
7+
8+
jobs:
9+
release_preview:
10+
uses: OpenVoiceOS/gh-automations/.github/workflows/release-preview.yml@dev
11+
secrets: inherit
12+
with:
13+
package_name: 'ovos_PHAL'
14+
version_file: 'ovos_PHAL/version.py'

0 commit comments

Comments
 (0)