Skip to content

Commit

Permalink
Add test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiagiupponi committed Dec 6, 2023
1 parent 1374acd commit 99df3e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/runtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ jobs:
uses: actions/checkout@v4
- name: Start containers
run: docker-compose -f "docker-compose-test.yaml" up -d --build
- name: Run django test suite
- name: Run django entrypoint
run: docker exec django4importer /bin/sh -c "sh /usr/src/importer/entrypoint_test.sh"
-name: Run geonode-importer tests
run: docker exec django4importer /bin/sh -c "set -a && . ./.env_test && set +a && coverage run --append --source=/usr/src/geonode/manage.py test importer --keepdb -v2 --noinput"
- name: Stop containers
if: always()
run: docker-compose -f "docker-compose-test.yaml" down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ WORKDIR /usr/src/importer

RUN pip install -e /usr/src/geonode/
RUN pip install --upgrade -e /usr/src/importer/
RUN pip install coverage
1 change: 0 additions & 1 deletion entrypoint_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ psql -d test_geonode_data --host db --username postgres -c 'GRANT ALL ON geometr
psql -d test_geonode_data --host db --username postgres -c 'GRANT ALL ON spatial_ref_sys TO PUBLIC;'
psql -d test_geonode_data --host db --username postgres -c 'GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO geonode_data;'
echo "Done"
set -a && . ./.env_test && set +a && python /usr/src/geonode/manage.py test importer --keepdb -v2

0 comments on commit 99df3e2

Please sign in to comment.