Fix Docker tests #411
Workflow file for this run
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: build ⚙️ | |
on: [ push, pull_request ] | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python-version: ['3.7', '3.8', '3.9'] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
name: Setup Python ${{ matrix.python-version }} | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
- name: Install requirements | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y binutils libproj-dev gdal-bin libgdal-dev libsqlite3-mod-spatialite spatialite-bin | |
pip install -r requirements-test.txt | |
pip install -r requirements-dev.txt | |
pip install pygdal=="`gdal-config --version`.*" | |
pip install . | |
- name: Configure sysctl limits | |
run: | | |
sudo swapoff -a | |
sudo sysctl -w vm.swappiness=1 | |
sudo sysctl -w fs.file-max=262144 | |
sudo sysctl -w vm.max_map_count=262144 | |
- name: Install and run Elasticsearch 📦 | |
uses: getong/[email protected] | |
with: | |
elasticsearch version: '8.2.2' | |
host port: 9200 | |
container port: 9200 | |
host node port: 9300 | |
node port: 9300 | |
discovery type: 'single-node' | |
- name: Run unit tests | |
run: | | |
pytest | |
# - name: run pre-commit (code formatting, lint and type checking) | |
# run: | | |
# python -m pip install pre-commit | |
# pre-commit run --all-files |