diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml new file mode 100644 index 0000000..6c7d049 --- /dev/null +++ b/.github/workflows/doc.yml @@ -0,0 +1,25 @@ +# SPDX-FileCopyrightText: 2024 Ledger SAS +# +# SPDX-License-Identifier: Apache-2.0 + +name: Python Doc + +on: + push: + branches: + - main + paths: + - 'doc/**' + - 'tox.ini' + - '.github/workflows/doc.yml' + pull_request: + 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..c8b03e8 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,25 @@ +# SPDX-FileCopyrightText: 2024 Ledger SAS +# +# SPDX-License-Identifier: Apache-2.0 + +name: Python Lint + +on: + push: + branches: + - main + paths: + - 'src/**' + - 'tox.ini' + - '.github/workflows/lint.yml' + pull_request: + 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 ecc7f15..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,37 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Ledger SAS -# -# SPDX-License-Identifier: Apache-2.0 - -on: - push: - pull_request: - branches: - - main - -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..35a8a63 --- /dev/null +++ b/.github/workflows/quality.yml @@ -0,0 +1,22 @@ +# SPDX-FileCopyrightText: 2024 Ledger SAS +# +# SPDX-License-Identifier: Apache-2.0 + +name: Python Code Quality + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + codeql: + 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..a436bdd --- /dev/null +++ b/.github/workflows/unittest.yml @@ -0,0 +1,31 @@ +# SPDX-FileCopyrightText: 2024 Ledger SAS +# +# SPDX-License-Identifier: Apache-2.0 + +name: Python Unit Tests + +on: + push: + branches: + - main + paths: + - 'src/**' + - 'tests/**' + - 'tox.ini' + - '.github/workflows/unittest.yml' + pull_request: + 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 2bb4a51..dcf018d 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,10 @@ SPDX-License-Identifier: Apache-2.0 ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/dts-utils) [![codecov](https://codecov.io/gh/outpost-os/python-dts-utils/graph/badge.svg?token=SGQPBE40UI)](https://codecov.io/gh/outpost-os/python-dts-utils) -![build](https://github.com/outpost-os/python-dts-utils/actions/workflows/main.yml/badge.svg) +![lint](https://github.com/outpost-os/python-dts-utils/actions/workflows/lint.yml/badge.svg) +![unittest](https://github.com/outpost-os/python-dts-utils/actions/workflows/unittest.yml/badge.svg) +![doc](https://github.com/outpost-os/python-dts-utils/actions/workflows/doc.yml/badge.svg) +![quality](https://github.com/outpost-os/python-dts-utils/actions/workflows/quality.yml/badge.svg) # dts-utils python package `dts-utils` is an utility python package that aims to ease dts handling in python and source code