From 1371725a6ca716b25fbd39c850665e3b46bbf81f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Duchaussois?= Date: Fri, 5 Nov 2021 15:00:10 +0100 Subject: don't checkout already checkouted and use project --- .github/workflows/pr.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index fed51c4..b4a20da 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -7,8 +7,11 @@ on: branches: - master jobs: + prepare: + run tests: runs-on: ubuntu-latest + uses: actions/checkout@v2 services: rundeck: image: rundeck/rundeck:3.4.3 @@ -23,13 +26,18 @@ jobs: --health-cmd="wget -t 1 -q -O /dev/null http://localhost:4440" --health-timeout 5s --health-retries 15 + --entrypoint steps: - uses: actions/checkout@v2 + with: + clean: false + path: "${{ github.repository }}" - 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 + cat /home/runner/work/ansible-rundeck-jobs/ansible-rundeck-jobs/test/tokens.properties + sudo apt update && sudo apt install -y python3-pip + pip3 install -r ${{ github.repository }}/requirements.txt + pip3 install -r ${{ github.repository }}/tests/requirements.txt + - run: http --ignore-stdin localhost:4440/api/26/projects name=test X-Rundeck-Auth-Token:testtoken Accept:application/json - run: | - cd tests && ansible-playbook -i inventory test.yml + cd ${{ github.repository }}/tests && ansible-playbook -i inventory test.yml -- cgit v1.2.3 From 2acad55d49f6ed90a842de7d1daa7c7bfb86b94b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Duchaussois?= Date: Mon, 15 Nov 2021 17:55:34 +0100 Subject: use specially crafted rundeck docker image --- .github/workflows/pr.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index b4a20da..3daa0e2 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -7,34 +7,26 @@ on: branches: - master jobs: - prepare: - run tests: runs-on: ubuntu-latest - uses: actions/checkout@v2 services: rundeck: - image: rundeck/rundeck:3.4.3 + image: fretlink/rundeckforci:3.4.7-latest ports: - 4440:4440 env: - RUNDECK_TOKENS_FILE: /tokens.properties - volumes: - - ${{ github.workspace }}/test/tokens.properties:/tokens.properties + RUNDECK_TOKENS_FILE: /etc/tokens.properties options: >- --health-interval=10s --health-cmd="wget -t 1 -q -O /dev/null http://localhost:4440" --health-timeout 5s --health-retries 15 - --entrypoint steps: - uses: actions/checkout@v2 with: - clean: false path: "${{ github.repository }}" - run: | - cat /home/runner/work/ansible-rundeck-jobs/ansible-rundeck-jobs/test/tokens.properties sudo apt update && sudo apt install -y python3-pip pip3 install -r ${{ github.repository }}/requirements.txt pip3 install -r ${{ github.repository }}/tests/requirements.txt -- cgit v1.2.3