-
Notifications
You must be signed in to change notification settings - Fork 0
chore(ci): expand dependabot coverage and add Java/Android CI #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
fe500ed
chore(ci): expand dependabot coverage and add test-java/test-android …
ksroda-sa 37a3301
chore(ci): narrow workflow path filters to per-framework subtrees
ksroda-sa b28e822
fix(java): declare Shibboleth repo in saml-sp-login pom
ksroda-sa 7dd0917
chore(ci): address copilot feedback on dependabot/android workflow
ksroda-sa 8db8d95
Merge branch 'main' into chore/expand-ci-coverage
ksroda-sa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| name: Test Android Builds | ||
|
|
||
| on: | ||
| push: | ||
| paths: | ||
| - "samples/react-native/**" | ||
| - "samples/android/**" | ||
| - ".github/workflows/test-android.yml" | ||
| pull_request: | ||
| paths: | ||
| - "samples/react-native/**" | ||
| - "samples/android/**" | ||
| - ".github/workflows/test-android.yml" | ||
| schedule: | ||
| - cron: "0 9 * * 1" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| find-projects: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| matrix: ${{ steps.find.outputs.matrix }} | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - id: find | ||
| # Discover any sample with an Android Gradle wrapper. Today: react-native | ||
| # samples; future: native android samples will surface automatically. | ||
| run: | | ||
| DIRS=$(find samples -name "gradlew" -not -path "*/node_modules/*" -not -path "*/build/*" -exec dirname {} \; 2>/dev/null \ | ||
| | sort | jq -R -s -c 'split("\n") | map(select(. != ""))') | ||
| echo "matrix=$DIRS" >> "$GITHUB_OUTPUT" | ||
|
|
||
| build: | ||
| needs: find-projects | ||
| if: ${{ needs.find-projects.outputs.matrix != '[]' }} | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| android_dir: ${{ fromJson(needs.find-projects.outputs.matrix) }} | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Set up JDK 17 | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: "temurin" | ||
| java-version: "17" | ||
|
|
||
| - name: Set up Android SDK | ||
| uses: android-actions/setup-android@v3 | ||
| with: | ||
| packages: "platform-tools platforms;android-36 build-tools;36.0.0" | ||
|
|
||
| # React Native samples need their JS deps installed first so autolinking | ||
| # can resolve native modules from node_modules. Detect by walking up to | ||
| # the directory that owns package.json. | ||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: "22" | ||
| - name: Enable Corepack | ||
| run: corepack enable | ||
|
|
||
| - name: Install JS dependencies (RN samples) | ||
| run: | | ||
| # ${{ matrix.android_dir }} is e.g. "samples/react-native/login-pkce/android". | ||
| # Walk up until we find a package.json or hit the repo root. | ||
| dir="${{ matrix.android_dir }}" | ||
| while [ "$dir" != "." ] && [ "$dir" != "/" ]; do | ||
| if [ -f "$dir/package.json" ]; then | ||
| echo "Installing JS deps in $dir" | ||
| (cd "$dir" && yarn install --immutable) | ||
| break | ||
| fi | ||
| dir=$(dirname "$dir") | ||
| done | ||
|
|
||
| - name: Generate debug keystore | ||
| # The committed sample doesn't ship debug.keystore (gitignored). | ||
| # Generate a throwaway one so Gradle's `validateSigningDebug` passes. | ||
| run: | | ||
| keytool -genkeypair -v \ | ||
| -keystore "${{ matrix.android_dir }}/app/debug.keystore" \ | ||
| -storepass android -alias androiddebugkey -keypass android \ | ||
| -keyalg RSA -keysize 2048 -validity 10000 \ | ||
| -dname "CN=Android Debug,O=Android,C=US" | ||
|
|
||
| - name: Cache Gradle | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.gradle/caches | ||
| ~/.gradle/wrapper | ||
| key: gradle-${{ runner.os }}-${{ hashFiles(format('{0}/gradle/wrapper/gradle-wrapper.properties', matrix.android_dir), format('{0}/build.gradle*', matrix.android_dir), format('{0}/app/build.gradle*', matrix.android_dir)) }} | ||
| restore-keys: gradle-${{ runner.os }}- | ||
|
|
||
| - name: assembleDebug | ||
| working-directory: ${{ matrix.android_dir }} | ||
| run: ./gradlew assembleDebug --no-daemon |
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| name: Test Java Frameworks | ||
|
|
||
| on: | ||
| push: | ||
| paths: | ||
| - "samples/java/**" | ||
| - ".github/workflows/test-java.yml" | ||
| pull_request: | ||
| paths: | ||
| - "samples/java/**" | ||
| - ".github/workflows/test-java.yml" | ||
| schedule: | ||
| - cron: "0 8 * * 1" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| find-projects: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| matrix: ${{ steps.find.outputs.matrix }} | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - id: find | ||
| run: | | ||
| DIRS=$(find samples -name "pom.xml" -not -path "*/target/*" -not -path "*/node_modules/*" -exec dirname {} \; 2>/dev/null | sort | jq -R -s -c 'split("\n") | map(select(. != ""))') | ||
| echo "matrix=$DIRS" >> "$GITHUB_OUTPUT" | ||
|
|
||
| test: | ||
| needs: find-projects | ||
| if: ${{ needs.find-projects.outputs.matrix != '[]' }} | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| project: ${{ fromJson(needs.find-projects.outputs.matrix) }} | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: "temurin" | ||
| java-version: "21" | ||
| cache: "maven" | ||
| - name: Build and test | ||
| working-directory: ${{ matrix.project }} | ||
| run: mvn -B verify | ||
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.