Add WASM support. #177
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: Dart CI | ||
| env: | ||
| PANA_SCORE_THRESHOLD: 20 | ||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
| jobs: | ||
| format: | ||
| name: Formatting | ||
| runs-on: ubuntu-slim | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| package: | ||
| - cryptography | ||
| - cryptography_test | ||
| - jwk | ||
| steps: | ||
| - uses: dart-lang/setup-dart@v1 | ||
| - uses: actions/checkout@v3 | ||
| - name: Verify that code is formatted | ||
| run: dart format --set-exit-if-changed . | ||
| working-directory: "./${{ matrix.package }}" | ||
| test: | ||
| name: Test | ||
| needs: format | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| package: | ||
| - cryptography | ||
| - jwk | ||
| compiler: | ||
| - vm | ||
| - dart2js | ||
| - dart2wasm | ||
| sdk: | ||
| # The oldest supported Dart SDK at the moment. | ||
| # Feel free to bump it up whenever needed. | ||
| - 3.6.0 | ||
| - beta | ||
| steps: | ||
| - uses: browser-actions/setup-chrome@v2 | ||
| if: ${{ matrix.compiler != vm }} | ||
| - uses: dart-lang/setup-dart@v1 | ||
| with: | ||
| sdk: ${{ matrix.sdk }} | ||
| - uses: actions/checkout@v3 | ||
| - name: Get dependencies | ||
| run: dart --version && dart pub get | ||
| working-directory: ./${{ matrix.package }} | ||
| - name: Analyze | ||
| run: dart analyze | ||
| working-directory: ./${{ matrix.package }} | ||
| - name: "Test: VM build" | ||
| if: ${{ matrix.compiler == 'vm' }} | ||
| run: dart test --platform vm | ||
| working-directory: ./${{ matrix.package }} | ||
| - name: "Test: JS build" | ||
| if: ${{ matrix.compiler == 'dart2js' }} | ||
| run: dart test --platform chrome --compiler dart2js | ||
| working-directory: ./${{ matrix.package }} | ||
| - name: "Test: WASM build" | ||
| if: ${{ matrix.compiler == 'dart2wasm' }} | ||
| run: dart test --platform chrome --compiler dart2wasm | ||
| working-directory: ./${{ matrix.package }} | ||
| package_health: | ||
| name: Analyze package health | ||
| needs: analyze | ||
| runs-on: ubuntu-slim | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| package: | ||
| - cryptography | ||
| - jwk | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - uses: dart-lang/setup-dart@v1 | ||
| - name: Install dependencies | ||
| run: dart --version && dart pub get && dart pub global activate pana | ||
| - name: Run package analyzer | ||
| run: dart pub global run pana --exit-code-threshold $PANA_SCORE_THRESHOLD | ||
| working-directory: ./${{ matrix.package }} | ||