From 6df4dfba416f6908179cd02c0854ae5302265973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Gr=C3=BCndger?= Date: Fri, 16 May 2025 19:09:09 +0200 Subject: [PATCH] split ci workflow into deploy and test --- .github/workflows/{ci.yaml => deploy.yaml} | 1 - .github/workflows/test.yaml | 44 ++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) rename .github/workflows/{ci.yaml => deploy.yaml} (99%) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/deploy.yaml similarity index 99% rename from .github/workflows/ci.yaml rename to .github/workflows/deploy.yaml index 774353e..150d072 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/deploy.yaml @@ -4,7 +4,6 @@ on: push: branches: - master - - development tags: - 'v*.*.*' pull_request: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..d5ca5b3 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,44 @@ +name: build + +on: + push: + branches: + - master + - development + pull_request: + workflow_dispatch: + +jobs: + build: + name: PyPI - Build Python 🐍 distributions 📦 + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install poetry + uses: abatilo/actions-poetry@v4 + + - name: Install the project dependencies + run: poetry install + + - name: Run the automated tests + run: poetry run pytest tests --cov=ogn --cov-report=xml --cov-report=html + + - name: Lint code with flake8 + run: poetry run flake8 ogn tests --ignore=E501,E701 + + - name: Build the project + run: poetry build + shell: bash