Skip to content

Pull in all changes from other repo #1

Pull in all changes from other repo

Pull in all changes from other repo #1

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
name: Run tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install GDAL
run: |
sudo apt-get update
sudo apt-get install -y \
libgdal-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 coveralls
if [ -f test-requirements.txt ]; then pip install --upgrade -r test-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 --junitxml=junit/test-results.xml --cov-config .coveragerc --cov-report= --cov=.
- name: Publish Unit Test Results
uses: EnricoMi/[email protected]
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
files: junit/*.xml
- name: Publish in Coveralls
uses: AndreMiras/coveralls-python-action@develop
if: success()
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: tests