-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to current Django/python/YAML.
As part of this, also includes: * Adding GitHub Actions * Fixing flake8 errors * Switching to pylibmc
- Loading branch information
Showing
17 changed files
with
138 additions
and
130 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
name: Test MapIt | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
postgres: | ||
image: postgis/postgis:13-3.2 | ||
env: | ||
POSTGRES_PASSWORD: mapit | ||
ports: | ||
- 5432:5432 | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
env: | ||
PGHOST: localhost | ||
PGUSER: postgres | ||
PGPASSWORD: mapit | ||
CFLAGS: "-O0" | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.10"] | ||
thing-to-test: [flake8, py310] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
set -xe | ||
python -VV | ||
python -m site | ||
pip install tox tox-gh-actions | ||
- name: Install GDAL | ||
run: sudo apt-get install gdal-bin | ||
|
||
- name: Set up config | ||
run: | | ||
createdb mapit | ||
psql -d mapit -c 'create extension postgis;' | ||
sed -r -e "s,(MAPIT_DB_USER:) 'mapit',\\1 'postgres'," conf/general.yml-example > conf/general.yml | ||
- name: Run tests | ||
run: tox | ||
env: | ||
THING_TO_TEST: ${{ matrix.thing-to-test }} |
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
#!/usr/bin/env python | ||
|
||
|
||
|
||
import os | ||
import re | ||
import sys | ||
|
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
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
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
Oops, something went wrong.