diff --git a/.github/workflows/pr-integration-tests.yaml b/.github/workflows/pr-integration-tests.yaml index 75fdff9a6..89f4ddeaf 100644 --- a/.github/workflows/pr-integration-tests.yaml +++ b/.github/workflows/pr-integration-tests.yaml @@ -16,22 +16,25 @@ jobs: - name: Check out repository uses: actions/checkout@v3 #---------------------------------------------- + # Get docker compose + #---------------------------------------------- + - name: Initialize Docker Compose + uses: isbang/compose-action@v1.5.1 + #---------------------------------------------- # Get changed files #---------------------------------------------- - name: Get changed files id: changed-files uses: tj-actions/changed-files@v40 - - name: Initialize Docker Compose - uses: isbang/compose-action@v1.5.1 #---------------------------------------------- - # Run integration tests for changed plugins + # Get changed plugins #---------------------------------------------- - - name: Run integration tests - id: integration-tests + - name: Get changed plugins + id: changed-plugins run: | - # This will navigate to each subdirectory and perform integration tests - # If we have a directory that isn't a plugin then it will need to skip it. Currently there is none. + # Collects all the plugin names that have changes. + # If there is directory that isn't a plugin then it will need to skip it. Currently there is none. declare -a changed_dirs=() for dir in ./*/; do current_folder=$(basename "$dir") @@ -44,8 +47,15 @@ jobs: done done + echo "changed-plugins=${changed_dirs[*]}" >> $GITHUB_OUTPUT - for dir in ${changed_dirs[*]}; do + #---------------------------------------------- + # Get changed plugins + #---------------------------------------------- + - name: Run Integration Tests + id: integration-tests + run: | + for dir in ${{ steps.changed-plugins.outputs.changed-plugins }}; do echo "Running integration tests for $dir" cd $dir/integration docker compose build diff --git a/.github/workflows/pr-linting-and-unit-tests.yaml b/.github/workflows/pr-linting-and-unit-tests.yaml index b13f743f9..7ff010aac 100644 --- a/.github/workflows/pr-linting-and-unit-tests.yaml +++ b/.github/workflows/pr-linting-and-unit-tests.yaml @@ -18,17 +18,30 @@ jobs: - name: Check out repository uses: actions/checkout@v3 #---------------------------------------------- + # Install python and poetry with cache + #---------------------------------------------- + - name: Install poetry + run: pipx install poetry + id: setup-poetry + - uses: actions/setup-python@v4 + with: + python-version: "3.9" + cache: "poetry" + #---------------------------------------------- # Get changed files #---------------------------------------------- - name: Get changed files id: changed-files uses: tj-actions/changed-files@v40 + #---------------------------------------------- + # Get changed plugins + #---------------------------------------------- - name: Get changed plugins id: changed-plugins run: | - # This will navigate to each subdirectory and perform integration tests - # If we have a directory that isn't a plugin then it will need to skip it. Currently there is none. + # Collects all the plugin names that have changes. + # If there is directory that isn't a plugin then it will need to skip it. Currently there is none. declare -a changed_dirs=() for dir in ./*/; do current_folder=$(basename "$dir") @@ -43,16 +56,6 @@ jobs: echo "changed-plugins=${changed_dirs[*]}" >> $GITHUB_OUTPUT #---------------------------------------------- - # Install python and poetry with cache - #---------------------------------------------- - - name: Install poetry - run: pipx install poetry - id: setup-poetry - - uses: actions/setup-python@v4 - with: - python-version: "3.9" - cache: "poetry" - #---------------------------------------------- # Install dependencies #---------------------------------------------- - name: Install dependencies