| # Run against all markdown files in the latest version of packages on pub.dev | |
| # to see if any can provoke a crash. | |
| name: "package:markdown: crash tests" | |
| permissions: | |
| contents: read | |
| on: | |
| # Run on PRs and pushes to the default branch. | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - '.github/workflows/markdown_crash_test.yaml' | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - '.github/workflows/markdown_crash_test.yaml' | |
| schedule: | |
| # “At 00:00 (UTC) on Sunday.” | |
| - cron: '0 0 * * 0' | |
| workflow_dispatch: | |
| defaults: | |
| run: | |
| working-directory: pkgs/markdown/ | |
| jobs: | |
| crash-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| with: | |
| persist-credentials: false | |
| - uses: dart-lang/setup-dart@7654d458321ee25acccccfdb86cd48bd95768ff1 | |
| - name: Install dependencies | |
| run: dart pub get | |
| - name: Run crash_test.dart | |
| run: dart test -P crash_test test/crash_test.dart |