From e267fbd60c5528eda3900e6adde8338ca44144d5 Mon Sep 17 00:00:00 2001 From: Cris Dywan Date: Tue, 2 Aug 2022 17:58:05 +0200 Subject: [PATCH] Initial commit --- .github/workflows/isotovideo.yaml | 23 +++++++++++++++++++++++ README.md | 28 ++++++++++++++++++++++++++++ action.yaml | 20 ++++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 .github/workflows/isotovideo.yaml create mode 100644 README.md create mode 100644 action.yaml diff --git a/.github/workflows/isotovideo.yaml b/.github/workflows/isotovideo.yaml new file mode 100644 index 0000000..9722fe1 --- /dev/null +++ b/.github/workflows/isotovideo.yaml @@ -0,0 +1,23 @@ +--- +name: isotovideo +# yamllint disable-line rule:truthy +on: [push, pull_request] +jobs: + isotovideo: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Prepare openQA test module + run: | + mkdir -p lib/Foo/Bar tests/spam needles + printf "package Foo::Bar::Baz; use Mojo::Base 'Exporter'; our @EXPORT_OK = qw(bla); sub bla {}; 1" > lib/Foo/Bar/Baz.pm + printf "use Mojo::Base 'basetest'; use Foo::Bar::Baz 'bla'; sub run {}; 1" > tests/spam/eggs.pm + - name: Run the action implemented in this repo + uses: ./ + with: + schedule: tests/spam/eggs + - uses: actions/upload-artifact@v2 + with: + name: Test results + path: . + if: always() diff --git a/README.md b/README.md new file mode 100644 index 0000000..4dfb388 --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +# Isotovideo test runner + +Execute standalone [openQA](https://open.qa) tests within containers. If your repository contains a test distribution or an openQA wheel this action can be used to execute it. + +## Inputs + +## schedule + +Analoguous to the SCHEDULE environment variable you can specify a list of test modules to be executed instead of using a main.pm in the same repository. + +## Example usage + +```yaml +on: [push, pull_request] +jobs: + isotovideo: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/isotovideo-action@main + with: + schedule: tests/foo/bar + - uses: actions/upload-artifact@v2 + with: + name: Test results + path: . + if: always() +``` diff --git a/action.yaml b/action.yaml new file mode 100644 index 0000000..c1617f7 --- /dev/null +++ b/action.yaml @@ -0,0 +1,20 @@ +--- +name: 'Isotovideo test runner' +description: 'Execute standalone openQA tests within containers' +branding: + icon: 'check-circle' + color: 'green' + +inputs: + schedule: + description: The test modules to be executed + required: false + default: '' + +runs: + using: docker + image: "registry.opensuse.org/devel/openqa/containers-tw/isotovideo:qemu-x86" + args: + - QEMU_NO_KVM=1 + - CASEDIR=. + - SCHEDULE=${{ inputs.schedule }}