Skip to content

Commit

Permalink
Split main workflow (#14)
Browse files Browse the repository at this point in the history
Add dedicated workflow for:

- [x] lint
- [x] unit test suite
- [x] doc
  • Loading branch information
fvalette-ledger authored Jul 15, 2024
2 parents 36322c5 + 9f7125c commit 99b3ef3
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 40 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: 2024 Ledger SAS
#
# SPDX-License-Identifier: Apache-2.0

name: Python Doc

on:
pull_request:
branches:
- main
paths:
- 'doc/**'
- 'tox.ini'
- '.github/workflows/doc.yml'

jobs:
doc:
uses: outpost-os/pipeline-python/.github/workflows/doc.yml@v1
with:
python-version: '3.10'
20 changes: 20 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: 2024 Ledger SAS
#
# SPDX-License-Identifier: Apache-2.0

name: Python Lint

on:
pull_request:
branches:
- main
paths:
- 'src/**'
- 'tox.ini'
- '.github/workflows/lint.yml'

jobs:
lint:
uses: outpost-os/pipeline-python/.github/workflows/lint.yml@v1
with:
python-version: '3.10'
38 changes: 0 additions & 38 deletions .github/workflows/main.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: 2024 Ledger SAS
#
# SPDX-License-Identifier: Apache-2.0

name: Python Code Quality

on:
workflow_run:
workflows: [Python Unit Tests]
types: [completed]

jobs:
codeql:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
permissions:
security-events: write
packages: read
actions: read
contents: read
uses: outpost-os/pipeline-python/.github/workflows/codeql.yml@v1
24 changes: 24 additions & 0 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# SPDX-FileCopyrightText: 2024 Ledger SAS
#
# SPDX-License-Identifier: Apache-2.0

name: Python Unit Tests

on:
pull_request:
branches:
- main
paths:
- 'src/**'
- 'tests/**'
- 'tox.ini'
- '.github/workflows/unittest.yml'
jobs:
unittest:
strategy:
matrix:
version: ['3.10', '3.11', '3.12']
uses: outpost-os/pipeline-python/.github/workflows/unittest.yml@v1
with:
python-version: ${{ matrix.version }}
secrets: inherit
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ SPDX-License-Identifier: Apache-2.0
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/svd2json)

[![codecov](https://codecov.io/gh/outpost-os/python-svd2json/graph/badge.svg?token=H6VZ47MTRN)](https://codecov.io/gh/outpost-os/python-svd2json)
![build](https://github.com/outpost-os/python-svd2json/actions/workflows/main.yml/badge.svg)

![lint](https://github.com/outpost-os/python-svd2json/actions/workflows/lint.yml/badge.svg)
![unittest](https://github.com/outpost-os/python-svd2json/actions/workflows/unittest.yml/badge.svg)
![doc](https://github.com/outpost-os/python-svd2json/actions/workflows/doc.yml/badge.svg)
![quality](https://github.com/outpost-os/python-svd2json/actions/workflows/quality.yml/badge.svg)

# Python svd2json package

Expand Down

0 comments on commit 99b3ef3

Please sign in to comment.