test gh #500
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Pull Request (Java) | |
on: | |
merge_group: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'java/**' | |
jobs: | |
prepare: | |
name: Prepare | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.paths.outputs.matrix }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Discover changed paths | |
id: paths | |
run: | | |
env | |
echo "a PR was triggered; let's find out which modules were updated" | |
# see: https://stackoverflow.com/a/8721550/24069 for usage of paste | |
pof=$( git diff --name-only --merge-base origin/$GITHUB_BASE_REF $GITHUB_SHA | xargs -n 1 dirname | uniq | grep -v "^\." | paste -s -d, - ) | |
echo "voici : $pof" | |
echo "matrix={\"java_sample_folder\":[\"java/akka\",\"java/native-image/quarkus-native\"]}" >> $GITHUB_OUTPUT | |
echo "These are the modules that we'll work with: $(cat $GITHUB_OUTPUT)" | |
smoke: | |
needs: prepare | |
name: Smoke Tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: ${{ fromJSON(needs.prepare.outputs.matrix) }} | |
# java_sample_folder: | |
steps: | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.18.x | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Test Java Samples | |
# with: | |
# yo: "YO" | |
# java_sample_folder: ${{ matrix.java_sample_folder }} | |
run: | | |
env | |
echo "this is yo: $YO | |
echo "this is folder I'll work against: ${{ matrix.java_sample_folder }} | |
# echo "long style ${{needs.prepare.outputs.changed_java_projects}}" | |
# echo "short $CHANGED_JAVA_PROJECTS" | |
# ./scripts/smoke.sh --suite java \ | |
# --builder paketobuildpacks/builder:full \ | |
# --builder paketobuildpacks/builder:base \ | |
# --builder paketobuildpacks/builder:tiny | |
# env: | |
# CHANGED_JAVA_PROJECTS: ${{needs.prepare.outputs.changed_java_projects}} |