libraries: add @shopify/react-native-skia
#2
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: Check only new libraries.json entries | |
| on: | |
| pull_request: | |
| jobs: | |
| runner-setup: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| runners: '{"ios":"macos-latest", "android": "ubuntu-latest"}' | |
| libraries: ${{ steps.read-libraries.outputs.libraries }} | |
| library-data: ${{ steps.read-libraries.outputs.library-data }} | |
| steps: | |
| - name: Checkout PR | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Save base libraries.json from main | |
| run: | | |
| git fetch origin main:refs/remotes/origin/main | |
| git show origin/main:./libraries.json > base.json | |
| - name: Diff and extract only changed libraries from JSON | |
| id: read-libraries | |
| run: | | |
| jq -n \ | |
| --slurpfile base base.json \ | |
| --slurpfile pr libraries.json \ | |
| ' | |
| ($pr | to_entries) as $pr_entries | |
| | ($base | to_entries) as $base_entries | |
| | reduce $pr_entries[] as $item ({}; | |
| if ($base[$item.key] // null) != $item.value | |
| then . + { ($item.key): $item.value } | |
| else . end | |
| ) | |
| ' > changed.json | |
| # Extract the keys of changed.json for the matrix | |
| echo "libraries=$(jq -c 'keys' changed.json)" >> $GITHUB_OUTPUT | |
| # Keep the full data of changed entries | |
| echo "library-data=$(jq -c '.' changed.json)" >> $GITHUB_OUTPUT | |
| test-library-on-nightly: | |
| name: "[${{ matrix.platform }}] ${{ matrix.library }}" | |
| needs: runner-setup | |
| runs-on: ${{ fromJSON(needs.runner-setup.outputs.runners)[matrix.platform] }} | |
| continue-on-error: true | |
| strategy: | |
| matrix: | |
| library: ${{ fromJSON(needs.runner-setup.outputs.libraries) }} | |
| platform: [ios, android] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22.14.0' | |
| cache: yarn | |
| - name: Test ${{ matrix.library }} | |
| id: run-test | |
| uses: ./.github/actions/test-library-on-nightly | |
| with: | |
| library-npm-package: ${{ fromJSON(needs.runner-setup.outputs.library-data)[matrix.library].installCommand }} | |
| platform: ${{ matrix.platform }} |