fix: unique registration action for each createThunk instance #172
Workflow file for this run
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-ecosystem | |
on: | |
push: | |
branches: main | |
pull_request: | |
branches: main | |
permissions: | |
contents: read | |
jobs: | |
test-ecosystem: | |
name: ${{ matrix.example.repo }}/${{ matrix.example.folder }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
example: | |
- owner: neurosnap | |
repo: starfx-examples | |
folder: vite-react | |
- owner: neurosnap | |
repo: starfx-examples | |
folder: parcel-react | |
- owner: neurosnap | |
repo: starfx-examples | |
folder: tests-rtl | |
steps: | |
- name: checkout main repo | |
uses: actions/checkout@v4 | |
with: | |
repository: "neurosnap/starfx" | |
path: "starfx" | |
- name: setup deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
# determines branch and sets it as output available through the `id` | |
- name: dynamically determine ${{ matrix.example.owner }}/${{ matrix.example.repo }} branch | |
id: conditionalBranch | |
shell: bash | |
run: deno run -A ./starfx/scripts/branch-exists.ts "$GITHUB_HEAD_REF" neurosnap/starfx-examples | |
- name: checkout ${{ matrix.example.owner }}/${{ matrix.example.repo }} on ${{ steps.conditionalBranch.outputs.branch }} | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ matrix.example.owner }}/${{ matrix.example.repo }} | |
path: ${{ matrix.example.repo }} | |
ref: ${{ steps.conditionalBranch.outputs.branch }} | |
- name: bundle for npm | |
shell: bash | |
run: deno task npm 0.0.0 | |
working-directory: starfx | |
# install in example repos | |
- name: install ${{ matrix.example.owner }}/${{ matrix.example.repo }} | |
shell: bash | |
working-directory: ${{ matrix.example.repo }}/${{ matrix.example.folder }} | |
run: npm install | |
# symlink example repos | |
- name: symlink built assets | |
shell: bash | |
run: deno task sync-build-to install ${{ matrix.example.repo }}/${{ matrix.example.folder }} | |
working-directory: starfx | |
# run build and test in example repos | |
- name: build ${{ matrix.example.owner }}/${{ matrix.example.repo }} | |
working-directory: ${{ matrix.example.repo }}/${{ matrix.example.folder }} | |
run: npm run build --if-present | |
- name: test ${{ matrix.example.owner }}/${{ matrix.example.repo }} | |
working-directory: ${{ matrix.example.repo }}/${{ matrix.example.folder }} | |
run: npm run test --if-present |