diff --git a/test/Dockerfile b/test/Dockerfile new file mode 100644 index 0000000..33c0c49 --- /dev/null +++ b/test/Dockerfile @@ -0,0 +1,21 @@ +FROM docker.io/library/fedora:latest + +RUN dnf -y upgrade \ + && dnf -y \ + --setopt=fastestmirror=True \ + --setopt=install_weak_deps=False \ + install \ + koji-builder \ + koji-hub \ + koji-utils \ + koji \ + postgresql \ + pylint \ + python3-flexmock \ + python3-jsonschema \ + python3-koji \ + && dnf clean all + +COPY entrypoint.sh /entrypoint.sh + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/test/action.yml b/test/action.yml new file mode 100644 index 0000000..321a256 --- /dev/null +++ b/test/action.yml @@ -0,0 +1,12 @@ +name: 'Koji plugin test environment' +description: 'Environment prepared for running koji plugin tests' +inputs: + run: + description: 'What to run' + required: true + default: 'echo "Nothing to do"' +runs: + using: 'docker' + image: 'Dockerfile' + args: + - ${{ inputs.run }} diff --git a/test/entrypoint.sh b/test/entrypoint.sh new file mode 100755 index 0000000..c324918 --- /dev/null +++ b/test/entrypoint.sh @@ -0,0 +1,6 @@ +#!/bin/sh -l +set -euo pipefail + +cd $GITHUB_WORKSPACE + +/bin/bash -o errexit -c "$1"