]> git.immae.eu Git - github/fretlink/ansible-rundeck-jobs.git/blob - .github/workflows/pr.yml
b4a20da66ee0172e400935b8b5143c30a1131274
[github/fretlink/ansible-rundeck-jobs.git] / .github / workflows / pr.yml
1 name: Test PR
2 on:
3 push:
4 branches:
5 - master
6 pull_request:
7 branches:
8 - master
9 jobs:
10 prepare:
11 run
12 tests:
13 runs-on: ubuntu-latest
14 uses: actions/checkout@v2
15 services:
16 rundeck:
17 image: rundeck/rundeck:3.4.3
18 ports:
19 - 4440:4440
20 env:
21 RUNDECK_TOKENS_FILE: /tokens.properties
22 volumes:
23 - ${{ github.workspace }}/test/tokens.properties:/tokens.properties
24 options: >-
25 --health-interval=10s
26 --health-cmd="wget -t 1 -q -O /dev/null http://localhost:4440"
27 --health-timeout 5s
28 --health-retries 15
29 --entrypoint
30
31 steps:
32 - uses: actions/checkout@v2
33 with:
34 clean: false
35 path: "${{ github.repository }}"
36 - run: |
37 cat /home/runner/work/ansible-rundeck-jobs/ansible-rundeck-jobs/test/tokens.properties
38 sudo apt update && sudo apt install -y python3-pip
39 pip3 install -r ${{ github.repository }}/requirements.txt
40 pip3 install -r ${{ github.repository }}/tests/requirements.txt
41 - run: http --ignore-stdin localhost:4440/api/26/projects name=test X-Rundeck-Auth-Token:testtoken Accept:application/json
42 - run: |
43 cd ${{ github.repository }}/tests && ansible-playbook -i inventory test.yml