Dart CI #33
This file contains 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
# Created with package:mono_repo v6.6.1 | |
name: Dart CI | |
on: | |
push: | |
branches: | |
- main | |
- master | |
pull_request: | |
schedule: | |
- cron: "0 0 * * 0" | |
defaults: | |
run: | |
shell: bash | |
env: | |
PUB_ENVIRONMENT: bot.github | |
permissions: read-all | |
jobs: | |
job_001: | |
name: "unit_test; PKG: packages/aurora_push_service; `flutter test`" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cache Pub hosted dependencies | |
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 | |
with: | |
path: "~/.pub-cache/hosted" | |
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/aurora_push_service;commands:test" | |
restore-keys: | | |
os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/aurora_push_service | |
os:ubuntu-latest;pub-cache-hosted;sdk:stable | |
os:ubuntu-latest;pub-cache-hosted | |
os:ubuntu-latest | |
- name: Setup Flutter SDK | |
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa | |
with: | |
channel: stable | |
- id: checkout | |
name: Checkout repository | |
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab | |
- id: packages_aurora_push_service_pub_upgrade | |
name: packages/aurora_push_service; flutter pub upgrade | |
run: flutter pub upgrade | |
if: "always() && steps.checkout.conclusion == 'success'" | |
working-directory: packages/aurora_push_service | |
- name: packages/aurora_push_service; flutter test | |
run: flutter test | |
if: "always() && steps.packages_aurora_push_service_pub_upgrade.conclusion == 'success'" | |
working-directory: packages/aurora_push_service | |
job_002: | |
name: "unit_test; PKG: packages/location_aurora; `flutter test`" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cache Pub hosted dependencies | |
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 | |
with: | |
path: "~/.pub-cache/hosted" | |
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/location_aurora;commands:test" | |
restore-keys: | | |
os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/location_aurora | |
os:ubuntu-latest;pub-cache-hosted;sdk:stable | |
os:ubuntu-latest;pub-cache-hosted | |
os:ubuntu-latest | |
- name: Setup Flutter SDK | |
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa | |
with: | |
channel: stable | |
- id: checkout | |
name: Checkout repository | |
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab | |
- id: packages_location_aurora_pub_upgrade | |
name: packages/location_aurora; flutter pub upgrade | |
run: flutter pub upgrade | |
if: "always() && steps.checkout.conclusion == 'success'" | |
working-directory: packages/location_aurora | |
- name: packages/location_aurora; flutter test | |
run: flutter test | |
if: "always() && steps.packages_location_aurora_pub_upgrade.conclusion == 'success'" | |
working-directory: packages/location_aurora | |
job_003: | |
name: "cron; PKG: packages/aurora_push_service; `flutter test`" | |
runs-on: ubuntu-latest | |
if: "github.event_name == 'schedule'" | |
steps: | |
- name: Cache Pub hosted dependencies | |
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 | |
with: | |
path: "~/.pub-cache/hosted" | |
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/aurora_push_service;commands:test" | |
restore-keys: | | |
os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/aurora_push_service | |
os:ubuntu-latest;pub-cache-hosted;sdk:stable | |
os:ubuntu-latest;pub-cache-hosted | |
os:ubuntu-latest | |
- name: Setup Flutter SDK | |
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa | |
with: | |
channel: stable | |
- id: checkout | |
name: Checkout repository | |
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab | |
- id: packages_aurora_push_service_pub_upgrade | |
name: packages/aurora_push_service; flutter pub upgrade | |
run: flutter pub upgrade | |
if: "always() && steps.checkout.conclusion == 'success'" | |
working-directory: packages/aurora_push_service | |
- name: packages/aurora_push_service; flutter test | |
run: flutter test | |
if: "always() && steps.packages_aurora_push_service_pub_upgrade.conclusion == 'success'" | |
working-directory: packages/aurora_push_service | |
needs: | |
- job_001 | |
- job_002 | |
job_004: | |
name: "cron; PKG: packages/location_aurora; `flutter test`" | |
runs-on: ubuntu-latest | |
if: "github.event_name == 'schedule'" | |
steps: | |
- name: Cache Pub hosted dependencies | |
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 | |
with: | |
path: "~/.pub-cache/hosted" | |
key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/location_aurora;commands:test" | |
restore-keys: | | |
os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:packages/location_aurora | |
os:ubuntu-latest;pub-cache-hosted;sdk:stable | |
os:ubuntu-latest;pub-cache-hosted | |
os:ubuntu-latest | |
- name: Setup Flutter SDK | |
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa | |
with: | |
channel: stable | |
- id: checkout | |
name: Checkout repository | |
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab | |
- id: packages_location_aurora_pub_upgrade | |
name: packages/location_aurora; flutter pub upgrade | |
run: flutter pub upgrade | |
if: "always() && steps.checkout.conclusion == 'success'" | |
working-directory: packages/location_aurora | |
- name: packages/location_aurora; flutter test | |
run: flutter test | |
if: "always() && steps.packages_location_aurora_pub_upgrade.conclusion == 'success'" | |
working-directory: packages/location_aurora | |
needs: | |
- job_001 | |
- job_002 | |
job_005: | |
name: Notify failure | |
runs-on: ubuntu-latest | |
if: 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}'}" \ | |
"${CHAT_WEBHOOK_URL}" | |
env: | |
CHAT_WEBHOOK_URL: "${{ secrets.CHAT_WEBHOOK_URL }}" | |
needs: | |
- job_001 | |
- job_002 | |
- job_003 | |
- job_004 |