Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,22 @@ jobs:
bundler-cache: true
- name: Update gems
run: bundle update
- name: install podman
run: sudo ./script/install_podman.sh
- name: Start rootless Podman API service
run: |
mkdir -p "${HOME}/var/run"
podman system service unix://${HOME}/var/run/podman.sock --time=0 &
echo $! > $HOME/podman_service.pid
# Wait until the socket is ready
for i in $(seq 1 20); do
if podman --url unix://${HOME}/var/run/podman.sock info >/dev/null 2>&1 ; then
echo "Podman socket ready"; break
fi
echo "Waiting for podman socket…"
sleep 1
done
- name: Point Docker-API at Podman
run: |
echo "DOCKER_HOST=unix://${HOME}/var/run/podman.sock" >> $GITHUB_ENV
echo "EXPECT_PODMAN=true" >> $GITHUB_ENV
- name: spec tests
run: bundle exec rake
11 changes: 11 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@

require 'docker'

# Hard-fail the build if we said we expected Podman but did not get it
if (ENV['EXPECT_PODMAN'] == 'true') && !Docker.podman?
warn <<~MSG
EXPECT_PODMAN=true was set, but Docker.podman? returned false.
Connected engine information:
#{Docker.version}
Make sure the Podman API socket is running and DOCKER_HOST points to it.
MSG
exit 1
end

ENV['DOCKER_API_USER'] ||= 'debbie_docker'
ENV['DOCKER_API_PASS'] ||= '*************'
ENV['DOCKER_API_EMAIL'] ||= '[email protected]'
Expand Down