From 29675007db5d5ddc62e29ffd9af2b3fc7d18343a Mon Sep 17 00:00:00 2001 From: Bertrand Lanson Date: Sat, 14 Sep 2024 20:53:19 +0200 Subject: [PATCH] ci: install collection locally to run tests --- .gitea/workflows/pull-request-open.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/pull-request-open.yml b/.gitea/workflows/pull-request-open.yml index 5852f9d..fd9d3ff 100644 --- a/.gitea/workflows/pull-request-open.yml +++ b/.gitea/workflows/pull-request-open.yml @@ -47,18 +47,16 @@ jobs: working-directory: ${{ gitea.workspace }} - name: Setup testing environment - run: | - mkdir -p /tmp/ansible_collections/ednz_cloud - ln -s ${{ gitea.workspace }} /tmp/ansible_collections/ednz_cloud/infomaniak + run: ansible-galaxy collection install ${{ gitea.workspace }} shell: bash working-directory: ${{ gitea.workspace }} - name: Run ansible unit tests run: ansible-test units --coverage shell: bash - working-directory: /tmp/ansible_collections/ednz_cloud/infomaniak + working-directory: ${{ gitea.workspace }} - name: Print coverage informations run: ansible-test coverage report shell: bash - working-directory: /tmp/ansible_collections/ednz_cloud/infomaniak + working-directory: ${{ gitea.workspace }}