Skip to content

ci: add workflow to test app can be run #3

ci: add workflow to test app can be run

ci: add workflow to test app can be run #3

Workflow file for this run

name: Run app test
on:
push:
branches-ignore:
- 'master'
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Build docker image
run: docker build --tag rws --no-cache .
- name: Run app in docker container
run: |
echo "CONTAINER_ID=$(docker run \
--env RWS_CFG=/app/config.default \
--env RWS_CREDENTIALS='{"user": "password"}' \
--env S3_ACCESS_KEY=foo \
--env S3_SECRET_KEY=bar \
--env S3_REGION=foobar \
--env S3_URL=http://127.0.0.1:9000 \
--env S3_BUCKET=barfoo \
--publish 5000:5000 \
--detach rws)" >> $GITHUB_ENV
- name: Check app is running
run: |
STATUS=$(docker inspect ${CONTAINER_ID} | jq -r '.[0]["State"]["Status"]')
if [ "${STATUS}" != "running" ]; then
echo "App is not running"
exit 1
fi