From ce8b31deb2249adb4874f0eaafa94fbbc2393446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Duchaussois?= Date: Fri, 5 Nov 2021 11:08:53 +0100 Subject: setup basic tests --- .github/workflows/pr.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/pr.yml (limited to '.github/workflows') diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..fed51c4 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,35 @@ +name: Test PR +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + tests: + runs-on: ubuntu-latest + services: + rundeck: + image: rundeck/rundeck:3.4.3 + ports: + - 4440:4440 + env: + RUNDECK_TOKENS_FILE: /tokens.properties + volumes: + - ${{ github.workspace }}/test/tokens.properties:/tokens.properties + options: >- + --health-interval=10s + --health-cmd="wget -t 1 -q -O /dev/null http://localhost:4440" + --health-timeout 5s + --health-retries 15 + + steps: + - uses: actions/checkout@v2 + - run: | + apt update && apt install -y python3-pip wait-for-it + pip3 install -r requirements.txt + pip3 install -r tests/requirements.txt + - run: http localhost:4440/api/26/projects name=test X-Rundeck-Auth-Token:testtoken Accept:application/json + - run: | + cd tests && ansible-playbook -i inventory test.yml -- cgit v1.2.3