fix docker caches #5
This file contains hidden or 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: GeoNode Test Suites | ||
| on: [push, workflow_dispatch] | ||
| jobs: | ||
| # ------------------------- | ||
| # BUILD IMMAGINI | ||
| # ------------------------- | ||
| build_images: | ||
| name: Build and cache Docker images | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| # Cache condivisa per tutti i job di questo run | ||
| - name: Restore Docker build cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: /tmp/.buildx-cache | ||
| key: geonode-cache-${{ github.run_id }} | ||
| - name: Build the stack (Docker Compose v2) | ||
| run: | | ||
| docker compose --env-file .env_test -f docker-compose-test.yml build --progress plain | ||
| env: | ||
| DOCKER_BUILDKIT: 1 | ||
| - name: Save Docker build cache | ||
| if: always() | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: /tmp/.buildx-cache | ||
| key: geonode-cache-${{ github.run_id }} | ||
| # ------------------------- | ||
| # TEST JOBS (riutilizzano cache) | ||
| # ------------------------- | ||
| geonode_test_suite_smoke: | ||
| name: Smoke Tests | ||
| needs: build_images | ||
| uses: ./.github/workflows/_geonode-build.yml | ||
|
Check failure on line 46 in .github/workflows/geonode-tests.yml
|
||
| with: | ||
| codecov_name: smoke_tests | ||
| test_suite: ./tests/test.sh geonode.tests.smoke geonode.tests.test_rest_api geonode.tests.test_search geonode.tests.test_utils geonode.tests.test_headers | ||
| geonode_test_suite: | ||
| name: Main Tests | ||
| needs: build_images | ||
| uses: ./.github/workflows/_geonode-build.yml | ||
| with: | ||
| codecov_name: main_tests | ||
| test_suite: ./tests/test.sh $(python -c "import sys;from geonode import settings;sys.stdout.write(' '.join([a+'.tests' for a in settings.GEONODE_APPS if 'security' not in a and 'geoserver' not in a and 'upload' not in a]))") geonode.thumbs.tests geonode.people.tests geonode.people.socialaccount.providers.geonode_openid_connect.tests | ||
| geonode_test_security: | ||
| name: Security Tests | ||
| needs: build_images | ||
| uses: ./.github/workflows/_geonode-build.yml | ||
| with: | ||
| codecov_name: security_tests | ||
| test_suite: ./tests/test.sh $(python -c "import sys;from geonode import settings;sys.stdout.write(' '.join([a+'.tests' for a in settings.GEONODE_APPS if 'security' in a]))") | ||
| geonode_test_gis_backend: | ||
| name: GIS Backend Tests | ||
| needs: build_images | ||
| uses: ./.github/workflows/_geonode-build.yml | ||
| with: | ||
| codecov_name: gis | ||
| test_suite: ./tests/test.sh $(python -c "import sys;from geonode import settings;sys.stdout.write(' '.join([a+'.tests' for a in settings.GEONODE_APPS if 'geoserver' in a]))") | ||
| geonode_test_rest_apis: | ||
| name: REST API Tests | ||
| needs: build_images | ||
| uses: ./.github/workflows/_geonode-build.yml | ||
| with: | ||
| codecov_name: api | ||
| test_suite: ./tests/test.sh geonode.api.tests geonode.base.api.tests geonode.layers.api.tests geonode.maps.api.tests geonode.documents.api.tests geonode.geoapps.api.tests | ||
| geonode_test_csw: | ||
| name: CSW Tests | ||
| needs: build_images | ||
| uses: ./.github/workflows/_geonode-build.yml | ||
| with: | ||
| codecov_name: csw | ||
| test_suite: ./tests/test.sh geonode.tests.csw geonode.catalogue.backends.tests | ||
| geonode_upload: | ||
| name: Upload Tests | ||
| needs: build_images | ||
| uses: ./.github/workflows/_geonode-build.yml | ||
| with: | ||
| codecov_name: importer | ||
| test_suite: ./tests/test.sh geonode.upload | ||