diff --git a/.github/workflows/check-tests.yml b/.github/workflows/check-tests.yml index 4d8e1814..0d54bad5 100644 --- a/.github/workflows/check-tests.yml +++ b/.github/workflows/check-tests.yml @@ -3,16 +3,54 @@ name: Tests on: [push] jobs: - build: - + tests: runs-on: ubuntu-latest strategy: max-parallel: 2 matrix: - python-version: [3.6,3.7,3.8,3.9] + python-version: [3.7,3.8,3.9] + services: + postgres: + image: postgis/postgis:14-master + env: + POSTGRES_DB: db-concrete-datastore + POSTGRES_USER: user-concrete-datastore + POSTGRES_PASSWORD: pwd-concrete-datastore + POSTGRES_HOST: localhost + POSTGRES_PORT: 5432 + ports: + - 5432:5432 + steps: + - uses: actions/checkout@v1 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Run SMTPD server + run: | + python -m pip install --upgrade pip + python -m smtpd -n -c DebuggingServer localhost:1025 & + - name: Install dependencies + run: | + python -m pip install --upgrade pip + sudo apt-get install binutils libproj-dev gdal-bin + pip install -e ".[tests]" + - name: Test with pytest + run: | + pytest --ds=tests.unittest_settings --pyargs -q tests --cov --cov-report html --cov-report term + - name: Tests coverage with CodeCov + run: | + codecov + + tests-python36: + runs-on: ubuntu-20.04 + strategy: + max-parallel: 2 + matrix: + python-version: [3.6] services: postgres: - image: postgis/postgis:12-master + image: postgis/postgis:14-master env: POSTGRES_DB: db-concrete-datastore POSTGRES_USER: user-concrete-datastore