summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/python-app.yml39
-rw-r--r--.github/workflows/python-pr-validation.yml34
2 files changed, 18 insertions, 55 deletions
diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml
deleted file mode 100644
index 96d39fa..0000000
--- a/.github/workflows/python-app.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-# This workflow will install Python dependencies, run tests and lint with a single version of Python
-# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
-
-name: Python application
-
-on:
- push:
- branches: [ "main" ]
- pull_request:
- branches: [ "main" ]
-
-permissions:
- contents: read
-
-jobs:
- build:
-
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v4.1.1
- - name: Set up Python 3.12.2
- uses: actions/setup-python@v5.0.0
- with:
- python-version: "3.12.2"
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip
- pip install flake8 pytest
- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- - name: Lint with flake8
- run: |
- # stop the build if there are Python syntax errors or undefined names
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- #- name: Test with pytest
- # run: |
- # pytest
diff --git a/.github/workflows/python-pr-validation.yml b/.github/workflows/python-pr-validation.yml
index 3aae387..611372b 100644
--- a/.github/workflows/python-pr-validation.yml
+++ b/.github/workflows/python-pr-validation.yml
@@ -1,29 +1,31 @@
-name: Python Pull Request Validation Workflow
+name: Pull Request Validation
on:
- pull_request:
- branches: [ "main", "master" ]
+ pull_request:
+ branches: ["main"]
+
+permissions:
+ contents: read
jobs:
- Validation:
+ validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v4
- - name: Set up Python 3.12
- uses: actions/setup-python@v2
+ - name: Set up Python 3.13
+ uses: actions/setup-python@v5
with:
python-version: "3.13"
- architecture: "x64"
+
+ - name: Install uv
+ uses: astral-sh/setup-uv@v3
+ with:
+ enable-cache: true
- name: Install dependencies
- run: |
- python3 -m pip install --upgrade pip
- pip install uv
- uv venv
- uv pip install -e .[dev]
+ run: uv sync --extra dev
- - name: Python Run Tests
- run: |
- uv run pytest -v
+ - name: Run tests
+ run: uv run pytest -v