Skip to content

Commit

Permalink
Merge pull request #1117 from atlanhq/FT-841
Browse files Browse the repository at this point in the history
Parallelize package tests
  • Loading branch information
cmgrote authored Dec 11, 2024
2 parents 8f72452 + a820bb6 commit 13aaa4b
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,26 @@ jobs:
with:
name: integration-logs
path: integration-tests/*.log
list-tests:
runs-on: ubuntu-latest
outputs:
tests: ${{ steps.test-directories.outputs.tests }}
steps:
- name: List package tests
id: test-directories
run: |
dirs=$(find samples/packages -type d -depth 1 | sed 's|/|:|g; s|^|:|; s|$|:test|' | grep -v 'build' | tr '\n' ' ')
json_dirs=$(echo "${dirs[@]}" | jq -R -c 'split(" ")[:-1]')
echo "tests=$json_dirs" >> $GITHUB_OUTPUT
package-test:
needs: [list-tests]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tests: ${{ fromJson(needs.list-tests.outputs.tests) }}
concurrency:
group: ${{ matrix.tests }}
name: "Packages"
steps:
- name: Free disk space
Expand All @@ -40,12 +58,16 @@ jobs:
java-version: 17
distribution: temurin
- name: Package tests
run: ./gradlew -PpackageTests test
env:
ATLAN_BASE_URL: ${{ secrets.ATLAN_BASE_URL }}
ATLAN_API_KEY: ${{ secrets.ATLAN_API_KEY }}
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
JAVA_TOOL_OPTIONS: "-Djava.io.tmpdir=/home/runner"
uses: nick-fields/retry@v3
with:
max_attempts: 3
timeout_minutes: 10
command: ./gradlew -PpackageTests ${{ matrix.tests }}
- if: success() || failure()
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit 13aaa4b

Please sign in to comment.