add github workflow #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |