]>
Commit | Line | Data |
---|---|---|
ce8b31de GD |
1 | name: Test PR |
2 | on: | |
3 | push: | |
4 | branches: | |
5 | - master | |
6 | pull_request: | |
7 | branches: | |
8 | - master | |
9 | jobs: | |
1371725a GD |
10 | prepare: |
11 | run | |
ce8b31de GD |
12 | tests: |
13 | runs-on: ubuntu-latest | |
1371725a | 14 | uses: actions/checkout@v2 |
ce8b31de GD |
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 | |
1371725a | 29 | --entrypoint |
ce8b31de GD |
30 | |
31 | steps: | |
32 | - uses: actions/checkout@v2 | |
1371725a GD |
33 | with: |
34 | clean: false | |
35 | path: "${{ github.repository }}" | |
ce8b31de | 36 | - run: | |
1371725a GD |
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 | |
ce8b31de | 42 | - run: | |
1371725a | 43 | cd ${{ github.repository }}/tests && ansible-playbook -i inventory test.yml |