| # Created with package:mono_repo v3.2.0 |
| name: Dart CI |
| on: |
| push: |
| branches: |
| - main |
| - master |
| pull_request: |
| schedule: |
| - cron: "0 0 * * 0" |
| defaults: |
| run: |
| shell: bash |
| env: |
| PUB_ENVIRONMENT: bot.github |
| FORCE_TEST_EXIT: true |
| |
| jobs: |
| job_001: |
| name: mono_repo self validate |
| runs-on: ubuntu-latest |
| steps: |
| - name: Cache Pub hosted dependencies |
| uses: actions/cache@v2 |
| with: |
| path: "~/.pub-cache/hosted" |
| key: "os:ubuntu-latest;pub-cache-hosted;dart:stable" |
| restore-keys: | |
| os:ubuntu-latest;pub-cache-hosted |
| os:ubuntu-latest |
| - uses: cedx/setup-dart@v2 |
| with: |
| release-channel: stable |
| version: latest |
| - run: dart --version |
| - uses: actions/checkout@v2 |
| - run: pub global activate mono_repo 3.2.0 |
| - run: pub global run mono_repo generate --validate |
| job_002: |
| name: "OS: linux; SDK: dev; PKGS: pkgs/test, pkgs/test_api, pkgs/test_core; TASKS: [`dartfmt -n --set-exit-if-changed .`, `dartanalyzer --enable-experiment=non-nullable --fatal-infos --fatal-warnings .`]" |
| runs-on: ubuntu-latest |
| steps: |
| - name: Cache Pub hosted dependencies |
| uses: actions/cache@v2 |
| with: |
| path: "~/.pub-cache/hosted" |
| key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:pkgs/test-pkgs/test_api-pkgs/test_core;commands:dartfmt-dartanalyzer" |
| restore-keys: | |
| os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:pkgs/test-pkgs/test_api-pkgs/test_core |
| os:ubuntu-latest;pub-cache-hosted;dart:dev |
| os:ubuntu-latest;pub-cache-hosted |
| os:ubuntu-latest |
| - uses: cedx/setup-dart@v2 |
| with: |
| release-channel: dev |
| - run: dart --version |
| - uses: actions/checkout@v2 |
| - env: |
| PKGS: pkgs/test pkgs/test_api pkgs/test_core |
| TRAVIS_OS_NAME: linux |
| run: tool/ci.sh dartfmt dartanalyzer |
| job_003: |
| name: "OS: linux; SDK: dev; PKG: pkgs/test; TASKS: `xvfb-run -s \"-screen 0 1024x768x24\" pub run --enable-experiment=non-nullable test --preset travis -x phantomjs --total-shards 5 --shard-index 0`" |
| runs-on: ubuntu-latest |
| steps: |
| - name: Cache Pub hosted dependencies |
| uses: actions/cache@v2 |
| with: |
| path: "~/.pub-cache/hosted" |
| key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:pkgs/test;commands:command_0" |
| restore-keys: | |
| os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:pkgs/test |
| os:ubuntu-latest;pub-cache-hosted;dart:dev |
| os:ubuntu-latest;pub-cache-hosted |
| os:ubuntu-latest |
| - uses: cedx/setup-dart@v2 |
| with: |
| release-channel: dev |
| - run: dart --version |
| - uses: actions/checkout@v2 |
| - env: |
| PKGS: pkgs/test |
| TRAVIS_OS_NAME: linux |
| run: tool/ci.sh command_0 |
| job_004: |
| name: "OS: linux; SDK: dev; PKG: pkgs/test; TASKS: `xvfb-run -s \"-screen 0 1024x768x24\" pub run --enable-experiment=non-nullable test --preset travis -x phantomjs --total-shards 5 --shard-index 1`" |
| runs-on: ubuntu-latest |
| steps: |
| - name: Cache Pub hosted dependencies |
| uses: actions/cache@v2 |
| with: |
| path: "~/.pub-cache/hosted" |
| key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:pkgs/test;commands:command_1" |
| restore-keys: | |
| os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:pkgs/test |
| os:ubuntu-latest;pub-cache-hosted;dart:dev |
| os:ubuntu-latest;pub-cache-hosted |
| os:ubuntu-latest |
| - uses: cedx/setup-dart@v2 |
| with: |
| release-channel: dev |
| - run: dart --version |
| - uses: actions/checkout@v2 |
| - env: |
| PKGS: pkgs/test |
| TRAVIS_OS_NAME: linux |
| run: tool/ci.sh command_1 |
| job_005: |
| name: "OS: linux; SDK: dev; PKG: pkgs/test; TASKS: `xvfb-run -s \"-screen 0 1024x768x24\" pub run --enable-experiment=non-nullable test --preset travis -x phantomjs --total-shards 5 --shard-index 2`" |
| runs-on: ubuntu-latest |
| steps: |
| - name: Cache Pub hosted dependencies |
| uses: actions/cache@v2 |
| with: |
| path: "~/.pub-cache/hosted" |
| key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:pkgs/test;commands:command_2" |
| restore-keys: | |
| os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:pkgs/test |
| os:ubuntu-latest;pub-cache-hosted;dart:dev |
| os:ubuntu-latest;pub-cache-hosted |
| os:ubuntu-latest |
| - uses: cedx/setup-dart@v2 |
| with: |
| release-channel: dev |
| - run: dart --version |
| - uses: actions/checkout@v2 |
| - env: |
| PKGS: pkgs/test |
| TRAVIS_OS_NAME: linux |
| run: tool/ci.sh command_2 |
| job_006: |
| name: "OS: linux; SDK: dev; PKG: pkgs/test; TASKS: `xvfb-run -s \"-screen 0 1024x768x24\" pub run --enable-experiment=non-nullable test --preset travis -x phantomjs --total-shards 5 --shard-index 3`" |
| runs-on: ubuntu-latest |
| steps: |
| - name: Cache Pub hosted dependencies |
| uses: actions/cache@v2 |
| with: |
| path: "~/.pub-cache/hosted" |
| key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:pkgs/test;commands:command_3" |
| restore-keys: | |
| os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:pkgs/test |
| os:ubuntu-latest;pub-cache-hosted;dart:dev |
| os:ubuntu-latest;pub-cache-hosted |
| os:ubuntu-latest |
| - uses: cedx/setup-dart@v2 |
| with: |
| release-channel: dev |
| - run: dart --version |
| - uses: actions/checkout@v2 |
| - env: |
| PKGS: pkgs/test |
| TRAVIS_OS_NAME: linux |
| run: tool/ci.sh command_3 |
| job_007: |
| name: "OS: linux; SDK: dev; PKG: pkgs/test; TASKS: `xvfb-run -s \"-screen 0 1024x768x24\" pub run --enable-experiment=non-nullable test --preset travis -x phantomjs --total-shards 5 --shard-index 4`" |
| runs-on: ubuntu-latest |
| steps: |
| - name: Cache Pub hosted dependencies |
| uses: actions/cache@v2 |
| with: |
| path: "~/.pub-cache/hosted" |
| key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:pkgs/test;commands:command_4" |
| restore-keys: | |
| os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:pkgs/test |
| os:ubuntu-latest;pub-cache-hosted;dart:dev |
| os:ubuntu-latest;pub-cache-hosted |
| os:ubuntu-latest |
| - uses: cedx/setup-dart@v2 |
| with: |
| release-channel: dev |
| - run: dart --version |
| - uses: actions/checkout@v2 |
| - env: |
| PKGS: pkgs/test |
| TRAVIS_OS_NAME: linux |
| run: tool/ci.sh command_4 |
| job_008: |
| name: "OS: linux; SDK: dev; PKG: pkgs/test_api; TASKS: `pub run --enable-experiment=non-nullable test --preset travis -x browser`" |
| runs-on: ubuntu-latest |
| steps: |
| - name: Cache Pub hosted dependencies |
| uses: actions/cache@v2 |
| with: |
| path: "~/.pub-cache/hosted" |
| key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:pkgs/test_api;commands:command_5" |
| restore-keys: | |
| os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:pkgs/test_api |
| os:ubuntu-latest;pub-cache-hosted;dart:dev |
| os:ubuntu-latest;pub-cache-hosted |
| os:ubuntu-latest |
| - uses: cedx/setup-dart@v2 |
| with: |
| release-channel: dev |
| - run: dart --version |
| - uses: actions/checkout@v2 |
| - env: |
| PKGS: pkgs/test_api |
| TRAVIS_OS_NAME: linux |
| run: tool/ci.sh command_5 |
| job_009: |
| needs: |
| - job_001 |
| - job_002 |
| - job_003 |
| - job_004 |
| - job_005 |
| - job_006 |
| - job_007 |
| - job_008 |
| name: Notify failure |
| runs-on: ubuntu-latest |
| if: "(github.event_name == 'push' || github.event_name == 'schedule') && failure()" |
| steps: |
| - run: | |
| curl -H "Content-Type: application/json" -X POST -d \ |
| "{'text':'Build failed! ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}'}" \ |
| "${BUILD_AND_TEST_TEAM_CHAT_WEBHOOK_URL}" |
| env: |
| CHAT_WEBHOOK_URL: "${{ secrets.BUILD_AND_TEST_TEAM_CHAT_WEBHOOK_URL }}" |