From 5d7a7e44b9dad1d13130176cddb82afe9e9d170b Mon Sep 17 00:00:00 2001 From: David Kane Date: Sat, 13 Jan 2024 17:29:37 +0000 Subject: [PATCH] add github workflow --- .github/workflows/pythonapp.yml | 29 +++++++++++++++++++++++++++++ runtime.txt | 1 + 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/pythonapp.yml create mode 100644 runtime.txt diff --git a/.github/workflows/pythonapp.yml b/.github/workflows/pythonapp.yml new file mode 100644 index 0000000..278a3e2 --- /dev/null +++ b/.github/workflows/pythonapp.yml @@ -0,0 +1,29 @@ +name: tests + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Parse Python version + run: sed s/python-// runtime.txt | head > .python-version + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version-file: ".python-version" + - name: Install dependencies + run: | + sudo apt install -y libgeos-dev + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: ruff + run: | + ruff . + ruff format . --check + - name: Test with pytest + run: | + pip install pytest + python -m pytest tests diff --git a/runtime.txt b/runtime.txt new file mode 100644 index 0000000..d1ba85d --- /dev/null +++ b/runtime.txt @@ -0,0 +1 @@ +python-3.10.13 \ No newline at end of file