switch CI to using workflow files (#428) #4
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: package:web | |
permissions: read-all | |
on: | |
# Run CI on pushes to the main branch and on PRs. | |
push: | |
branches: [ main ] | |
paths: | |
- '.github/workflows/web.yaml' | |
- 'web/**' | |
pull_request: | |
paths: | |
- '.github/workflows/web.yaml' | |
- 'web/**' | |
schedule: | |
- cron: "0 0 * * 0" | |
defaults: | |
run: | |
working-directory: web/ | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
sdk: [3.4, beta, dev] | |
test_config: ['-p chrome', '-p chrome -c dart2wasm'] | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c | |
with: | |
sdk: ${{ matrix.sdk }} | |
- run: dart pub get | |
- run: dart format --output=none --set-exit-if-changed . | |
if: ${{ matrix.sdk == 'dev' }} | |
- run: dart analyze --fatal-infos | |
- run: dart test ${{ matrix.test_config }} | |
# Validate the 'dart fix' metadata. | |
- run: dart fix --compare-to-golden test_fixes |