Skip to content

Update README with React 18 js files #55

Update README with React 18 js files

Update README with React 18 js files #55

Workflow file for this run

name: CI
on:
push:
branches:
- 'master'
- 'test_consume_*'
pull_request:
branches:
- '**'
jobs:
checks:
uses: Workiva/gha-dart-oss/.github/workflows/[email protected]
with:
format-check: false
additional-checks: |
no_entrypoint_imports
build:
uses: Workiva/gha-dart-oss/.github/workflows/[email protected]
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
with:
sdk: 2.19.6
- name: Check formatting
run: dart format . -l 120 --set-exit-if-changed
js-bundle:
name: Build JS bundle
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm install
working-directory: ./js_src
- name: Build JS bundle
run: npm run build
working-directory: ./js_src
- name: Check for untracked API changes
run: git diff --exit-code
test-unit:
runs-on: ubuntu-latest
name: unit tests - React ${{ matrix.react }} (${{ matrix.release-mode && 'release' || 'dev' }})
strategy:
fail-fast: false
matrix:
react: [ 17, 18 ]
release-mode: [true, false]
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
with:
sdk: 2.19.6
- name: Switch to React 17 Test HTML
if: ${{ matrix.react == 17 }}
run: |
mv test/unit/unit_test_template.html test/unit/unit_test_template-old.html
mv test/unit/unit_test_template-react17.html test/unit/unit_test_template.html
- name: Install dependencies
run: dart pub get
timeout-minutes: 2
- name: Run tests
timeout-minutes: 10
run: |
args=()
if [[ "${{ matrix.release-mode }}" == "true" ]]; then
args+=(--release)
fi
dart run build_runner test "${args[@]}" -- -P concurrent-tests --preset=react${{ matrix.react }}
dart run build_runner test "${args[@]}" -- -P non-concurrent-tests --preset=react${{ matrix.react }}