Limit Dependabot to SDK dependencies #216
Workflow file for this run
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
| name: Test and Coverage Check | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| on: | |
| pull_request: | |
| branches: | |
| - "master" | |
| - "develop-v13" | |
| # Allows you to run this workflow manually from the Actions tab. | |
| workflow_dispatch: | |
| jobs: | |
| install-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Use Node.js 22 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: "npm" | |
| - name: Install Node modules | |
| run: npm ci | |
| env: | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| - name: Linting | |
| run: npm run lint | |
| - name: Unit & Integration tests with coverage | |
| run: npm test -- --coverage --no-watch --passWithNoTests | |
| env: | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| - name: Build package | |
| run: npm run build | |
| env: | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| - name: Package sanity check | |
| run: npm run check:package | |
| env: | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| - name: Pack dry run | |
| run: npm run pack:dry-run | |
| env: | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| - name: Publish dry run | |
| run: npm run publish:dry-run | |
| env: | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| - name: Upload coverage artifacts | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: coverage-report | |
| path: coverage/ | |
| retention-days: 30 | |
| - name: Generate coverage summary | |
| if: always() | |
| run: | | |
| echo "## Test Coverage Report" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| if [ -f coverage/coverage-summary.json ]; then | |
| echo "\`\`\`json" >> $GITHUB_STEP_SUMMARY | |
| cat coverage/coverage-summary.json >> $GITHUB_STEP_SUMMARY | |
| echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
| else | |
| echo "No coverage summary available" >> $GITHUB_STEP_SUMMARY | |
| fi | |
| - name: Comment coverage on PR | |
| uses: romeovs/lcov-reporter-action@v0.3.1 | |
| if: github.event_name == 'pull_request' | |
| with: | |
| lcov-file: ./coverage/lcov.info | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| delete-old-comments: true | |
| compatibility-smoke: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: Minimum supported | |
| expo: "52" | |
| react: "18" | |
| react-native: "0.76" | |
| - name: Current example | |
| expo: "55" | |
| react: "19.2.0" | |
| react-native: "0.83" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Use Node.js 22 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: "npm" | |
| - name: Install Node modules | |
| run: npm ci | |
| env: | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| - name: Build package | |
| run: npm run build | |
| env: | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| - name: Pack local SDK | |
| run: | | |
| PACKAGE_TARBALL="$(node scripts/pack-compat-tarball.js "$RUNNER_TEMP")" | |
| echo "PACKAGE_TARBALL=$PACKAGE_TARBALL" >> "$GITHUB_ENV" | |
| env: | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| - name: Install SDK with ${{ matrix.name }} peers | |
| run: | | |
| mkdir "$RUNNER_TEMP/compat-app" | |
| cd "$RUNNER_TEMP/compat-app" | |
| npm init -y | |
| npm install "$PACKAGE_TARBALL" \ | |
| "expo@${{ matrix.expo }}" \ | |
| "react@${{ matrix.react }}" \ | |
| "react-native@${{ matrix.react-native }}" \ | |
| --package-lock=false | |
| npm ls react-native-plaid-link-sdk expo react react-native | |
| node -e "const pkg = require('react-native-plaid-link-sdk/package.json'); if (!pkg.exports || !pkg.exports['.']) throw new Error('Missing root export');" | |
| env: | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| validate-linkkit-xcframework: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Use Node.js 22 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Validate LinkKit XCFramework slices and signatures | |
| run: npm run check:linkkit | |
| expo-56-ios-prebuild: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Use Node.js 22 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: "npm" | |
| - name: Install Node modules | |
| run: npm ci | |
| env: | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| - name: Build package | |
| run: npm run build | |
| env: | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| - name: Pack local SDK | |
| run: | | |
| PACKAGE_TARBALL="$(node scripts/pack-compat-tarball.js "$RUNNER_TEMP")" | |
| echo "PACKAGE_TARBALL=$PACKAGE_TARBALL" >> "$GITHUB_ENV" | |
| env: | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| - name: Create Expo SDK 56 app with packed SDK | |
| run: | | |
| mkdir "$RUNNER_TEMP/expo-56-ios-app" | |
| cd "$RUNNER_TEMP/expo-56-ios-app" | |
| npm init -y | |
| npm pkg set \ | |
| name=expo-56-ios-app \ | |
| private=true \ | |
| main=node_modules/expo/AppEntry.js | |
| cat > app.json <<'JSON' | |
| { | |
| "expo": { | |
| "name": "Expo 56 iOS App", | |
| "slug": "expo-56-ios-app", | |
| "ios": { | |
| "bundleIdentifier": "com.plaid.expo56iosapp" | |
| } | |
| } | |
| } | |
| JSON | |
| cat > App.js <<'JS' | |
| import { Text } from "react-native"; | |
| export default function App() { | |
| return <Text>Expo 56 iOS App</Text>; | |
| } | |
| JS | |
| npm install "$PACKAGE_TARBALL" \ | |
| expo@56.0.12 \ | |
| react@19.2.3 \ | |
| react-native@0.85.3 \ | |
| --package-lock=false | |
| npm ls react-native-plaid-link-sdk expo react react-native | |
| env: | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| - name: Cache CocoaPods | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/Library/Caches/CocoaPods | |
| ${{ runner.temp }}/expo-56-ios-app/ios/Pods | |
| key: ${{ runner.os }}-expo-56-pods-${{ hashFiles('package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-expo-56-pods- | |
| - name: Generate iOS project with Expo SDK 56 | |
| working-directory: ${{ runner.temp }}/expo-56-ios-app | |
| run: npx expo prebuild --platform ios --clean | |
| env: | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| build-ios-example: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Use Node.js 22 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: "npm" | |
| - name: Install root dependencies | |
| run: npm install | |
| env: | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| - name: Install example dependencies | |
| working-directory: example | |
| run: npm install | |
| env: | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| - name: Cache CocoaPods | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/Library/Caches/CocoaPods | |
| example/ios/Pods | |
| key: ${{ runner.os }}-pods-${{ hashFiles('example/ios/Podfile.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pods- | |
| - name: Generate iOS project with Expo | |
| working-directory: example | |
| run: npx expo prebuild --platform ios --clean | |
| env: | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| - name: Build iOS app for Simulator | |
| working-directory: example | |
| run: | | |
| xcodebuild -workspace ios/reactnativeplaidlinksdkexample.xcworkspace \ | |
| -scheme reactnativeplaidlinksdkexample \ | |
| -sdk iphonesimulator \ | |
| -configuration Release \ | |
| -destination 'platform=iOS Simulator,name=iPhone 16,OS=latest' \ | |
| clean build \ | |
| CODE_SIGNING_ALLOWED=NO \ | |
| | tee xcodebuild.log | |
| - name: Upload build logs | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: ios-build-logs | |
| path: example/xcodebuild.log | |
| retention-days: 7 | |
| test-android-example: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Use Node.js 22 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: "npm" | |
| - name: Use Java 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Install root dependencies | |
| run: npm ci | |
| env: | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| - name: Install example dependencies | |
| working-directory: example | |
| run: npm install | |
| env: | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| - name: Generate Android project with Expo | |
| working-directory: example | |
| run: npx expo prebuild --platform android --clean | |
| env: | |
| NPM_CONFIG_REGISTRY: https://registry.npmjs.org/ | |
| - name: Run Android unit tests | |
| working-directory: example/android | |
| run: ./gradlew testDebugUnitTest |