feat: add GitHub Actions workflow for publishing to PyPI #3
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: earthdaily-python-client CI | |
on: | |
push: | |
branches: | |
- main | |
- beta/* | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install GDAL and dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y gdal-bin libgdal-dev | |
- name: Install Poetry | |
run: pip install poetry | |
- name: Install dependencies | |
run: poetry install | |
- name: Run tests with tox | |
run: poetry run tox -e py${{ matrix.python-version }} | |
lint-format-type: | |
name: Lint, Format and Type Check | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install GDAL and dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y gdal-bin libgdal-dev | |
- name: Install Poetry | |
run: pip install poetry | |
- name: Install dependencies | |
run: poetry install | |
- name: Run Linting | |
run: poetry run tox -e lint | |
- name: Run Formatting Check | |
run: poetry run tox -e format | |
# - name: Run MyPy | |
# run: poetry run tox -e mypy |