Skip to content

Test the current docker image #1636

Test the current docker image

Test the current docker image #1636

Workflow file for this run

name: Test the current docker image
on:
schedule:
# We want to run it every day
- cron: '0 0 * * *'
jobs:
test-docker-image:
runs-on: ubuntu-22.04
timeout-minutes: 1
services:
ftpserver:
image: fclairamb/ftpserver
ports:
- 2121-2130:2121-2130
steps:
- name: Run sample
env:
SERVER_PORT: 2121
run: |
set -xe
# Getting a file
curl https://placekitten.com/2048/2048 -o kitty.jpg
# Waiting for server to be ready
while ! nc -z localhost ${SERVER_PORT} </dev/null; do sleep 1; done
# Upload a file
curl -v -T kitty.jpg ftp://test:test@localhost:${SERVER_PORT}/remote.jpg
# Download a file
curl -v ftp://test:test@localhost:2121/remote.jpg -o remote.jpg
# Checking that the output file exists
if [ ! -f remote.jpg ]; then
exit 1
fi
# Comparing file contents
diff kitty.jpg remote.jpg