Skip to content

Commit

Permalink
HDX-10066 replace docker-compose v1 with v2
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandru-m-g committed Aug 5, 2024
1 parent b7845cf commit bef145f
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,56 +13,56 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Building CKAN docker image
run: docker-compose build ckan
- name: Spinning up docker-compose stack
run: docker compose build ckan
- name: Spinning up docker compose stack
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
docker-compose up -d
docker compose up -d
sleep 10
docker-compose exec -T solr bin/solr create -c ckan -d /configsets/hdx-solr
docker-compose exec -T ckan sh -c "mkdir -p /srv/filestore/storage/uploads/group"
docker-compose exec -T ckan sh -c "touch /srv/filestore/storage/uploads/group/david_thumbnail.png"
docker-compose exec -T ckan sh -c "envsubst < /srv/ckan/docker/hdx-test-core.ini.tpl > /srv/ckan/hdx-test-core.ini"
docker compose exec -T solr bin/solr create -c ckan -d /configsets/hdx-solr
docker compose exec -T ckan sh -c "mkdir -p /srv/filestore/storage/uploads/group"
docker compose exec -T ckan sh -c "touch /srv/filestore/storage/uploads/group/david_thumbnail.png"
docker compose exec -T ckan sh -c "envsubst < /srv/ckan/docker/hdx-test-core.ini.tpl > /srv/ckan/hdx-test-core.ini"
- name: Installing HDX/CKAN PY3 dev-requirements
run: docker-compose exec -T ckan pip install -r /srv/ckan/dev-requirements.txt
run: docker compose exec -T ckan pip install -r /srv/ckan/dev-requirements.txt
- name: Preparing database
run: |
docker-compose exec -T ckan /usr/bin/bash -c \
docker compose exec -T ckan /usr/bin/bash -c \
'echo "$HDX_CKANDB_ADDR:$HDX_CKANDB_PORT:$HDX_CKANDB_DB:$HDX_CKANDB_USER:$HDX_CKANDB_PASS" > /root/.pgpass && chmod 600 /root/.pgpass'
docker-compose exec -T db psql -U ckan -c "create database datastore owner ckan;"
docker-compose exec -T db psql -U ckan -c "create role datastore with login;"
docker-compose exec -T db psql -U ckan -c "alter role datastore with password 'datastore';"
docker compose exec -T db psql -U ckan -c "create database datastore owner ckan;"
docker compose exec -T db psql -U ckan -c "create role datastore with login;"
docker compose exec -T db psql -U ckan -c "alter role datastore with password 'datastore';"
- name: Building UI search index
run: |
docker-compose exec -T ckan hdxckantool feature
docker compose exec -T ckan hdxckantool feature
- name: PY3/Testing hdx_service_checker
run: docker-compose exec -T ckan sh -c "./run_pytest_with_coverage.sh hdx_service_checker"
run: docker compose exec -T ckan sh -c "./run_pytest_with_coverage.sh hdx_service_checker"
- name: PY3/Testing sitemap
run: docker-compose exec -T ckan sh -c "./run_pytest_with_coverage.sh sitemap"
run: docker compose exec -T ckan sh -c "./run_pytest_with_coverage.sh sitemap"
- name: PY3/Testing ytp_request
run: |
docker-compose exec -T ckan sh -c "ln -s /srv/ckan/ckanext-ytp-request/ckanext/ytp/request /srv/ckan/ckanext-ytp-request/ckanext/ytp-request"
docker-compose exec -T ckan sh -c "./run_pytest_with_coverage.sh ytp-request"
docker compose exec -T ckan sh -c "ln -s /srv/ckan/ckanext-ytp-request/ckanext/ytp/request /srv/ckan/ckanext-ytp-request/ckanext/ytp-request"
docker compose exec -T ckan sh -c "./run_pytest_with_coverage.sh ytp-request"
- name: PY3/Testing hdx_dataviz
run: docker-compose exec -T ckan sh -c "./run_pytest_with_coverage.sh hdx_dataviz"
run: docker compose exec -T ckan sh -c "./run_pytest_with_coverage.sh hdx_dataviz"
- name: PY3/Testing hdx_pages
run: docker-compose exec -T ckan sh -c "./run_pytest_with_coverage.sh hdx_pages"
run: docker compose exec -T ckan sh -c "./run_pytest_with_coverage.sh hdx_pages"
- name: PY3/Testing hdx_theme
run: docker-compose exec -T ckan sh -c "./run_pytest_with_coverage.sh hdx_theme"
run: docker compose exec -T ckan sh -c "./run_pytest_with_coverage.sh hdx_theme"
- name: PY3/Testing hdx_package
run: docker-compose exec -T ckan sh -c "./run_pytest_with_coverage.sh hdx_package"
run: docker compose exec -T ckan sh -c "./run_pytest_with_coverage.sh hdx_package"
- name: PY3/Testing hdx_search
run: docker-compose exec -T ckan sh -c "./run_pytest_with_coverage.sh hdx_search"
run: docker compose exec -T ckan sh -c "./run_pytest_with_coverage.sh hdx_search"
- name: PY3/Testing hdx_users
run: docker-compose exec -T ckan sh -c "./run_pytest_with_coverage.sh hdx_users"
run: docker compose exec -T ckan sh -c "./run_pytest_with_coverage.sh hdx_users"
- name: PY3/Testing hdx_user_extra
run: docker-compose exec -T ckan sh -c "./run_pytest_with_coverage.sh hdx_user_extra"
run: docker compose exec -T ckan sh -c "./run_pytest_with_coverage.sh hdx_user_extra"
- name: PY3/Testing hdx_org_group
run: docker-compose exec -T ckan sh -c "./run_pytest_with_coverage.sh hdx_org_group"
run: docker compose exec -T ckan sh -c "./run_pytest_with_coverage.sh hdx_org_group"
- name: Publish in Coveralls
if: success()
run: |
docker-compose exec -T ckan sh -c "git config --global --add safe.directory /srv/ckan"
docker-compose exec -T ckan sh -c "coveralls"
docker compose exec -T ckan sh -c "git config --global --add safe.directory /srv/ckan"
docker compose exec -T ckan sh -c "coveralls"

0 comments on commit bef145f

Please sign in to comment.