diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml new file mode 100644 index 0000000..52c3bf5 --- /dev/null +++ b/.github/workflows/doc.yml @@ -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' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..a9c67d7 --- /dev/null +++ b/.github/workflows/lint.yml @@ -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' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index c56aa7b..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Ledger SAS -# -# SPDX-License-Identifier: Apache-2.0 - -on: - push: - pull_request: - branches: - - main - workflow_dispatch: - -jobs: - ut: - 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 - doc: - uses: outpost-os/pipeline-python/.github/workflows/doc.yml@v1 - with: - python-version: '3.11' - lint: - needs: [ ut, doc ] - if: ${{ github.event_name == 'pull_request' }} - uses: outpost-os/pipeline-python/.github/workflows/lint.yml@v1 - with: - python-version: '3.10' - codeql: - needs: [ ut ] - permissions: - security-events: write - packages: read - actions: read - contents: read - uses: outpost-os/pipeline-python/.github/workflows/codeql.yml@v1 diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml new file mode 100644 index 0000000..93f9f87 --- /dev/null +++ b/.github/workflows/quality.yml @@ -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 diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml new file mode 100644 index 0000000..b2bc097 --- /dev/null +++ b/.github/workflows/unittest.yml @@ -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 diff --git a/README.md b/README.md index 5804fb9..9c76a80 100644 --- a/README.md +++ b/README.md @@ -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