diff options
author | Gaëtan Duchaussois <gaetan.duchaussois@fretlink.com> | 2021-11-05 11:08:53 +0100 |
---|---|---|
committer | Gaëtan Duchaussois <gaetan.duchaussois@fretlink.com> | 2021-11-05 14:47:16 +0100 |
commit | ce8b31deb2249adb4874f0eaafa94fbbc2393446 (patch) | |
tree | 6b72a0b81d703556efb5fca4807b535ef19543de /.github/workflows | |
parent | a9a36e35be18c8c3ef078a13120974b316d2a8d4 (diff) | |
download | ansible-rundeck-jobs-ce8b31deb2249adb4874f0eaafa94fbbc2393446.tar.gz ansible-rundeck-jobs-ce8b31deb2249adb4874f0eaafa94fbbc2393446.tar.zst ansible-rundeck-jobs-ce8b31deb2249adb4874f0eaafa94fbbc2393446.zip |
setup basic tests
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/pr.yml | 35 |
1 files changed, 35 insertions, 0 deletions
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 @@ | |||
1 | name: Test PR | ||
2 | on: | ||
3 | push: | ||
4 | branches: | ||
5 | - master | ||
6 | pull_request: | ||
7 | branches: | ||
8 | - master | ||
9 | jobs: | ||
10 | tests: | ||
11 | runs-on: ubuntu-latest | ||
12 | services: | ||
13 | rundeck: | ||
14 | image: rundeck/rundeck:3.4.3 | ||
15 | ports: | ||
16 | - 4440:4440 | ||
17 | env: | ||
18 | RUNDECK_TOKENS_FILE: /tokens.properties | ||
19 | volumes: | ||
20 | - ${{ github.workspace }}/test/tokens.properties:/tokens.properties | ||
21 | options: >- | ||
22 | --health-interval=10s | ||
23 | --health-cmd="wget -t 1 -q -O /dev/null http://localhost:4440" | ||
24 | --health-timeout 5s | ||
25 | --health-retries 15 | ||
26 | |||
27 | steps: | ||
28 | - uses: actions/checkout@v2 | ||
29 | - run: | | ||
30 | apt update && apt install -y python3-pip wait-for-it | ||
31 | pip3 install -r requirements.txt | ||
32 | pip3 install -r tests/requirements.txt | ||
33 | - run: http localhost:4440/api/26/projects name=test X-Rundeck-Auth-Token:testtoken Accept:application/json | ||
34 | - run: | | ||
35 | cd tests && ansible-playbook -i inventory test.yml | ||