fix(svelte5): synchronously flush changes after mount and unmount #492
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: CI | |
on: | |
push: | |
branches: [main, next] | |
pull_request: | |
branches: [main, next] | |
schedule: | |
# Tuesdays at 14:45 UTC (10:45 EST) | |
- cron: 45 14 * * 1 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
main: | |
# ignore all-contributors PRs | |
if: ${{ !contains(github.head_ref, 'all-contributors') }} | |
name: Node ${{ matrix.node }}, Svelte ${{ matrix.svelte }}, ${{ matrix.test-runner }} | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.experimental }} | |
# enable OIDC for codecov uploads | |
permissions: | |
id-token: write | |
strategy: | |
fail-fast: false | |
matrix: | |
node: ['16', '18', '20'] | |
svelte: ['3', '4'] | |
test-runner: ['vitest:jsdom', 'vitest:happy-dom', 'jest'] | |
experimental: [false] | |
include: | |
- node: '20' | |
svelte: 'next' | |
test-runner: 'vitest:jsdom' | |
experimental: true | |
- node: '20' | |
svelte: 'next' | |
test-runner: 'vitest:happy-dom' | |
experimental: true | |
- node: '20' | |
svelte: 'next' | |
test-runner: 'jest' | |
experimental: true | |
steps: | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v4 | |
- name: ⎔ Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: 📥 Download deps | |
run: | | |
npm install --no-package-lock | |
npm install --no-save svelte@${{ matrix.svelte }} | |
- name: ▶️ Run tests | |
run: npm run test:${{ matrix.test-runner }} | |
- name: ▶️ Run type-checks | |
# NOTE: `SvelteComponent` is not generic in Svelte v3, so type-checking will not pass | |
if: ${{ matrix.node == '20' && matrix.svelte != '3' && matrix.test-runner == 'vitest:jsdom' }} | |
run: npm run types | |
- name: ⬆️ Upload coverage report | |
uses: codecov/codecov-action@v4 | |
with: | |
use_oidc: true | |
fail_ci_if_error: true | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v4 | |
- name: ⎔ Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: 📥 Download deps | |
run: npm install --no-package-lock | |
- name: 🏗️ Build types | |
run: npm run build | |
- name: ⬆️ Upload types build | |
uses: actions/upload-artifact@v4 | |
with: | |
name: types | |
path: types | |
release: | |
needs: [main, build] | |
runs-on: ubuntu-latest | |
if: ${{ github.repository == 'testing-library/svelte-testing-library' && | |
contains('refs/heads/main,refs/heads/next', github.ref) && | |
github.event_name == 'push' }} | |
steps: | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v4 | |
- name: ⎔ Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: 📥 Downloads types build | |
uses: actions/download-artifact@v4 | |
with: | |
name: types | |
path: types | |
- name: 🚀 Release | |
uses: cycjimmy/semantic-release-action@v4 | |
with: | |
semantic_version: 24 | |
extra_plugins: | | |
conventional-changelog-conventionalcommits@8 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |