|
12 | 12 | - 'scripts/.util/tools.json'
|
13 | 13 |
|
14 | 14 | jobs:
|
| 15 | + prepare: |
| 16 | + name: Prepare |
| 17 | + runs-on: ubuntu-latest |
| 18 | + outputs: |
| 19 | + matrix: ${{ steps.paths.outputs.matrix }} |
| 20 | + steps: |
| 21 | + - name: Checkout |
| 22 | + uses: actions/checkout@v4 |
| 23 | + - name: Discover changed paths |
| 24 | + id: paths |
| 25 | + run: | |
| 26 | + all_java_smoke_test_paths=$( find ./java -iname "smoke_test" | jq --raw-input | jq --slurp --compact-output ) |
| 27 | + all_other_smoke_test_paths='["ca-certificates","dotnet-core","git","go","nodejs","php","procfile","python","ruby","web-servers"]' |
| 28 | + all_paths=$( echo -e "$all_java_smoke_test_paths\n$all_other_smoke_test_paths" | jq -s 'add' -c ) |
| 29 | + |
| 30 | + echo "These are the Java projects we'll run smoke tests against: $all_java_smoke_test_paths" >> $GITHUB_STEP_SUMMARY |
| 31 | + echo "These are the other folders we'll run smoke tests against: : $all_other_smoke_test_paths" >> $GITHUB_STEP_SUMMARY |
| 32 | + echo "These are all the smoke test locations: $all_paths" >> $GITHUB_STEP_SUMMARY |
| 33 | + echo "matrix={\"suite\":$all_paths}" >> $GITHUB_OUTPUT |
| 34 | + echo "This is how the matrix will look like: $(cat $GITHUB_OUTPUT)" |
| 35 | +
|
15 | 36 | smoke:
|
| 37 | + needs: prepare |
16 | 38 | name: Smoke Tests
|
17 | 39 | runs-on: ubuntu-latest
|
18 | 40 | strategy:
|
19 | 41 | fail-fast: false
|
20 | 42 | max-parallel: 3
|
21 |
| - matrix: |
22 |
| - suite: |
23 |
| - - 'ca-certificates' |
24 |
| - - 'dotnet-core' |
25 |
| - - 'git' |
26 |
| - - 'go' |
27 |
| - - 'java' |
28 |
| - - 'nodejs' |
29 |
| - - 'php' |
30 |
| - - 'procfile' |
31 |
| - - 'python' |
32 |
| - - 'ruby' |
33 |
| - - 'web-servers' |
| 43 | + matrix: ${{ fromJSON(needs.prepare.outputs.matrix) }} |
34 | 44 |
|
35 | 45 | steps:
|
36 | 46 | - name: Setup Go
|
37 | 47 | uses: actions/setup-go@v4
|
38 | 48 | with:
|
39 |
| - go-version: 1.18.x |
| 49 | + go-version: 1.20.x |
40 | 50 |
|
41 | 51 | - name: Checkout
|
42 | 52 | uses: actions/checkout@v4
|
43 | 53 |
|
44 |
| - - name: Cache local Gradle repository |
45 |
| - if: ${{ matrix.suite == 'java' }} |
46 |
| - uses: actions/cache@v3 |
47 |
| - with: |
48 |
| - path: | |
49 |
| - ~/.gradle/caches |
50 |
| - ~/.gradle/wrapper |
51 |
| - key: ${{ runner.os }}-gradle-${{ hashFiles('java/**/*.gradle*', 'java/**/gradle-wrapper.properties') }} |
52 |
| - restore-keys: | |
53 |
| - ${{ runner.os }}-gradle- |
54 |
| -
|
55 |
| - - name: Cache local Maven repository |
56 |
| - if: ${{ matrix.suite == 'java' }} |
57 |
| - uses: actions/cache@v3 |
58 |
| - with: |
59 |
| - path: | |
60 |
| - ~/.m2/repository |
61 |
| - ~/.m2/wrapper |
62 |
| - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml', 'java/**/maven-wrapper.properties') }} |
63 |
| - restore-keys: | |
64 |
| - ${{ runner.os }}-maven- |
65 |
| -
|
66 |
| - - name: Setup Directories |
67 |
| - if: ${{ matrix.suite == 'java' }} |
68 |
| - run: | |
69 |
| - #!/usr/bin/env bash |
70 |
| - set -euo pipefail |
71 |
| -
|
72 |
| - mkdir -p ~/.m2/repository |
73 |
| - mkdir -p ~/.m2/repository/wrapper/dists |
74 |
| - mkdir -p ~/.gradle/caches |
75 |
| - mkdir -p ~/.gradle/wrapper/dists |
76 |
| - chmod -R 775 ~/.m2 |
77 |
| - chmod -R 775 ~/.gradle |
78 |
| -
|
79 | 54 | - name: Test ${{ matrix.suite }}
|
80 | 55 | run: |
|
81 |
| - ./scripts/smoke.sh --builder paketobuildpacks/builder:full --suite ${{ matrix.suite }} |
| 56 | + ./scripts/smoke.sh --builder paketobuildpacks/builder-jammy-full --suite ${{ matrix.suite }} |
82 | 57 |
|
83 | 58 | - name: File Issue
|
84 | 59 | if: ${{ failure() && github.event_name != 'pull_request' }}
|
|
0 commit comments