Skip to content

Commit

Permalink
Fix GitHub Actions for new koha-testing-docker changes
Browse files Browse the repository at this point in the history
* Update docker-compose to 'docker compose'
* Container names have changed
* No need to rm docker containers, they are already down
  • Loading branch information
kylemhall committed Aug 7, 2024
1 parent 3f776c7 commit 971e855
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,21 +87,21 @@ jobs:
mkdir -p env
wget -O env/defaults.env https://gitlab.com/koha-community/koha-testing-docker/raw/main/env/defaults.env
cp env/defaults.env .env
docker-compose pull
docker compose pull
# - name: Setup Debug Session
# uses: csexton/debugger-action@master

- name: Run tests
run: |
pwd
ls -alh
docker-compose -f docker-compose.yml -p koha up --detach
docker compose -f docker-compose.yml -p koha up --detach
cd ..
pwd
ls -alh
echo "`date`: Installing YAML::Syck, needed for Koha 20.11 and earlier"
docker exec koha_koha_1 apt-get install -y libyaml-syck-perl libemail-valid-perl libmojo-jwt-perl
while [ $? -ne 0 ]; do echo "INSTALL YAML::Syck" && docker exec koha_koha_1 apt-get install -y libyaml-syck-perl libemail-valid-perl; done
docker exec koha-koha-1 apt-get install -y libyaml-syck-perl libemail-valid-perl libmojo-jwt-perl
while [ $? -ne 0 ]; do echo "INSTALL YAML::Syck" && docker exec koha-koha-1 apt-get install -y libyaml-syck-perl libemail-valid-perl; done
echo "SLEEPING 3 MINUTES"
sleep 60
echo "1 MINUTE DONE"
Expand All @@ -111,15 +111,14 @@ jobs:
echo "3 MINUTES DONE"
echo "WAKING UP"
echo "DOCKER LOGS"
docker logs koha_koha_1 2>&1
docker logs koha-koha-1 2>&1
echo "/DOCKER LOGS"
docker cp $GITHUB_REPO/. koha_koha_1:/var/lib/koha/kohadev/plugins
docker exec koha_koha_1 bash -c 'prove /var/lib/koha/kohadev/plugins/t'
docker cp $GITHUB_REPO/. koha-koha-1:/var/lib/koha/kohadev/plugins
docker exec koha-koha-1 bash -c 'prove /var/lib/koha/kohadev/plugins/t'
- name: Post test cleanup
run: |
docker-compose down
docker rm -f $(docker ps -a -f "name=koha_" -q)
docker compose down
docker volume prune -f
docker image prune -f
rm docker-compose.yml
Expand Down

0 comments on commit 971e855

Please sign in to comment.