@@ -18,73 +18,65 @@ jobs:
1818 run : |
1919 docker compose --env-file .env_test -f docker-compose-test.yml build --progress plain
2020
21- - name : List built images
22- run : docker images
21+ - name : Save built Docker images
22+ run : |
23+ mkdir -p docker_images
24+ docker save -o docker_images/django.tar geonode/geonode:latest-ubuntu-24.04
2325
24- # - name: Save built Docker images
25- # run: |
26- # mkdir -p docker_images
27- # docker save -o docker_images/django.tar geonode/geonode:latest-ubuntu-24.04
28- # docker save -o docker_images/geoserver.tar geonode/geoserver:2.24.4-latest
29- # docker save -o docker_images/db.tar geonode/postgis:15-3.5-latest || true
30- #
31- # - name: Upload Docker images as artifact
32- # uses: actions/upload-artifact@v4
33- # with:
34- # name: docker-images
35- # path: docker_images
36- # retention-days: 1 # automatically expires after 1 day
37- #
38- # geonode_test_suite_smoke:
39- # name: Test tests location
40- # needs: build_images
41- # runs-on: ubuntu-24.04
42- #
43- # steps:
44- # - name: Checkout repository
45- # uses: actions/checkout@v4
46- #
47- # - name: Download built Docker images
48- # uses: actions/download-artifact@v4
49- # with:
50- # name: docker-images
51- # path: docker_images
52- #
53- # - name: Load Docker images
54- # run: |
55- # docker load -i docker_images/django.tar
56- # docker load -i docker_images/geoserver.tar
57- # docker load -i docker_images/db.tar || true
58- # docker load -i docker_images/celery.tar || true
59- #
60- # - name: Start the stack
61- # run: docker compose --env-file .env_test -f docker-compose-test.yml up -d
62- # working-directory: ${{ github.workspace }}
63- #
64- # - name: Wait for services to become healthy
65- # run: |
66- # n=1
67- # m=10
68- # until [ $n -gt $m ]
69- # do
70- # sleep 60
71- # DJANGO_STATUS=$(docker inspect --format='{{.State.Health.Status}}' django4geonode)
72- # GEOSERVER_STATUS=$(docker inspect --format='{{.State.Health.Status}}' geoserver4geonode)
73- # echo "⏳ Waited $n min (of $m)"
74- # if [[ $DJANGO_STATUS == healthy && $GEOSERVER_STATUS == healthy ]]; then
75- # break
76- # fi
77- # docker ps
78- # n=$((n+1))
79- # done
80- # [[ $DJANGO_STATUS == healthy && $GEOSERVER_STATUS == healthy ]]
81- # working-directory: ${{ github.workspace }}
82- #
83- # - name: Run smoke tests
84- # run: |
85- # docker compose --env-file .env_test -f docker-compose-test.yml exec django bash -lc \
86- # "pwd && ls -all /usr/src/geonode"
87- # working-directory: ${{ github.workspace }}
26+ - name : Upload Docker images as artifact
27+ uses : actions/upload-artifact@v4
28+ with :
29+ name : docker-images
30+ path : docker_images
31+ retention-days : 1 # automatically expires after 1 day
32+
33+ geonode_test_suite_smoke :
34+ name : Test tests location
35+ needs : build_images
36+ runs-on : ubuntu-24.04
37+
38+ steps :
39+ - name : Checkout repository
40+ uses : actions/checkout@v4
41+
42+ - name : Download built Docker images
43+ uses : actions/download-artifact@v4
44+ with :
45+ name : docker-images
46+ path : docker_images
47+
48+ - name : Load Docker images
49+ run : |
50+ docker load -i docker_images/django.tar
51+
52+ - name : Start the stack
53+ run : docker compose --env-file .env_test -f docker-compose-test.yml up -d
54+ working-directory : ${{ github.workspace }}
55+
56+ - name : Wait for services to become healthy
57+ run : |
58+ n=1
59+ m=10
60+ until [ $n -gt $m ]
61+ do
62+ sleep 60
63+ DJANGO_STATUS=$(docker inspect --format='{{.State.Health.Status}}' django4geonode)
64+ GEOSERVER_STATUS=$(docker inspect --format='{{.State.Health.Status}}' geoserver4geonode)
65+ echo "⏳ Waited $n min (of $m)"
66+ if [[ $DJANGO_STATUS == healthy && $GEOSERVER_STATUS == healthy ]]; then
67+ break
68+ fi
69+ docker ps
70+ n=$((n+1))
71+ done
72+ [[ $DJANGO_STATUS == healthy && $GEOSERVER_STATUS == healthy ]]
73+ working-directory : ${{ github.workspace }}
74+
75+ - name : Run smoke tests
76+ run : |
77+ docker compose --env-file .env_test -f docker-compose-test.yml exec django bash -lc \
78+ "pwd && ls -all /usr/src/geonode"
79+ working-directory : ${{ github.workspace }}
8880#
8981# - name: Stop stack (always)
9082# if: always()
0 commit comments