Skip to content

Dart Unit CI

Dart Unit CI #1264

Workflow file for this run

# Created with package:mono_repo v6.6.1
name: Dart Unit CI
on:
push:
branches:
- main
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; linux; Dart 3.0.0; PKGS: dartfn, functions_framework_builder, google_cloud, integration_test; `dart test`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:dartfn-functions_framework_builder-google_cloud-integration_test;commands:test_0"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:dartfn-functions_framework_builder-google_cloud-integration_test
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
with:
sdk: "3.0.0"
- id: checkout
name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- id: dartfn_pub_upgrade
name: dartfn; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: dartfn
- name: dartfn; dart test
run: dart test
if: "always() && steps.dartfn_pub_upgrade.conclusion == 'success'"
working-directory: dartfn
- id: functions_framework_builder_pub_upgrade
name: functions_framework_builder; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: functions_framework_builder
- name: functions_framework_builder; dart test
run: dart test
if: "always() && steps.functions_framework_builder_pub_upgrade.conclusion == 'success'"
working-directory: functions_framework_builder
- id: google_cloud_pub_upgrade
name: google_cloud; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: google_cloud
- name: google_cloud; dart test
run: dart test
if: "always() && steps.google_cloud_pub_upgrade.conclusion == 'success'"
working-directory: google_cloud
- id: integration_test_pub_upgrade
name: integration_test; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: integration_test
- name: integration_test; dart test
run: dart test
if: "always() && steps.integration_test_pub_upgrade.conclusion == 'success'"
working-directory: integration_test
job_002:
name: "unit_test; linux; Dart 3.0.0; PKG: google_cloud; `./tool/docker_test_script.sh`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:google_cloud;commands:command"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:google_cloud
os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
with:
sdk: "3.0.0"
- id: checkout
name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- id: google_cloud_pub_upgrade
name: google_cloud; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: google_cloud
- name: google_cloud; ./tool/docker_test_script.sh
run: ./tool/docker_test_script.sh
if: "always() && steps.google_cloud_pub_upgrade.conclusion == 'success'"
working-directory: google_cloud
job_003:
name: "unit_test; linux; Dart dev; PKGS: dartfn, dartfn/templates/cloudevent, dartfn/templates/helloworld, dartfn/templates/json, examples/fullstack/backend, examples/hello, examples/json, examples/protobuf_firestore, examples/raw_cloudevent, functions_framework_builder, google_cloud, integration_test; `dart test`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dartfn-dartfn/templates/cloudevent-dartfn/templates/helloworld-dartfn/templates/json-examples/fullstack/backend-examples/hello-examples/json-examples/protobuf_firestore-examples/raw_cloudevent-functions_framework_builder-google_cloud-integration_test;commands:test_0"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dartfn-dartfn/templates/cloudevent-dartfn/templates/helloworld-dartfn/templates/json-examples/fullstack/backend-examples/hello-examples/json-examples/protobuf_firestore-examples/raw_cloudevent-functions_framework_builder-google_cloud-integration_test
os:ubuntu-latest;pub-cache-hosted;sdk:dev
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
with:
sdk: dev
- id: checkout
name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- id: dartfn_pub_upgrade
name: dartfn; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: dartfn
- name: dartfn; dart test
run: dart test
if: "always() && steps.dartfn_pub_upgrade.conclusion == 'success'"
working-directory: dartfn
- id: dartfn_templates_cloudevent_pub_upgrade
name: dartfn/templates/cloudevent; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: dartfn/templates/cloudevent
- name: dartfn/templates/cloudevent; dart test
run: dart test
if: "always() && steps.dartfn_templates_cloudevent_pub_upgrade.conclusion == 'success'"
working-directory: dartfn/templates/cloudevent
- id: dartfn_templates_helloworld_pub_upgrade
name: dartfn/templates/helloworld; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: dartfn/templates/helloworld
- name: dartfn/templates/helloworld; dart test
run: dart test
if: "always() && steps.dartfn_templates_helloworld_pub_upgrade.conclusion == 'success'"
working-directory: dartfn/templates/helloworld
- id: dartfn_templates_json_pub_upgrade
name: dartfn/templates/json; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: dartfn/templates/json
- name: dartfn/templates/json; dart test
run: dart test
if: "always() && steps.dartfn_templates_json_pub_upgrade.conclusion == 'success'"
working-directory: dartfn/templates/json
- id: examples_fullstack_backend_pub_upgrade
name: examples/fullstack/backend; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: examples/fullstack/backend
- name: examples/fullstack/backend; dart test
run: dart test
if: "always() && steps.examples_fullstack_backend_pub_upgrade.conclusion == 'success'"
working-directory: examples/fullstack/backend
- id: examples_hello_pub_upgrade
name: examples/hello; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: examples/hello
- name: examples/hello; dart test
run: dart test
if: "always() && steps.examples_hello_pub_upgrade.conclusion == 'success'"
working-directory: examples/hello
- id: examples_json_pub_upgrade
name: examples/json; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: examples/json
- name: examples/json; dart test
run: dart test
if: "always() && steps.examples_json_pub_upgrade.conclusion == 'success'"
working-directory: examples/json
- id: examples_protobuf_firestore_pub_upgrade
name: examples/protobuf_firestore; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: examples/protobuf_firestore
- name: examples/protobuf_firestore; dart test
run: dart test
if: "always() && steps.examples_protobuf_firestore_pub_upgrade.conclusion == 'success'"
working-directory: examples/protobuf_firestore
- id: examples_raw_cloudevent_pub_upgrade
name: examples/raw_cloudevent; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: examples/raw_cloudevent
- name: examples/raw_cloudevent; dart test
run: dart test
if: "always() && steps.examples_raw_cloudevent_pub_upgrade.conclusion == 'success'"
working-directory: examples/raw_cloudevent
- id: functions_framework_builder_pub_upgrade
name: functions_framework_builder; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: functions_framework_builder
- name: functions_framework_builder; dart test
run: dart test
if: "always() && steps.functions_framework_builder_pub_upgrade.conclusion == 'success'"
working-directory: functions_framework_builder
- id: google_cloud_pub_upgrade
name: google_cloud; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: google_cloud
- name: google_cloud; dart test
run: dart test
if: "always() && steps.google_cloud_pub_upgrade.conclusion == 'success'"
working-directory: google_cloud
- id: integration_test_pub_upgrade
name: integration_test; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: integration_test
- name: integration_test; dart test
run: dart test
if: "always() && steps.integration_test_pub_upgrade.conclusion == 'success'"
working-directory: integration_test
job_004:
name: "unit_test; linux; Dart dev; PKGS: dartfn, functions_framework, integration_test; `dart test --run-skipped -t presubmit-only`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dartfn-functions_framework-integration_test;commands:test_1"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:dartfn-functions_framework-integration_test
os:ubuntu-latest;pub-cache-hosted;sdk:dev
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
with:
sdk: dev
- id: checkout
name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- id: dartfn_pub_upgrade
name: dartfn; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: dartfn
- name: "dartfn; dart test --run-skipped -t presubmit-only"
run: dart test --run-skipped -t presubmit-only
if: "always() && steps.dartfn_pub_upgrade.conclusion == 'success'"
working-directory: dartfn
- id: functions_framework_pub_upgrade
name: functions_framework; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: functions_framework
- name: "functions_framework; dart test --run-skipped -t presubmit-only"
run: dart test --run-skipped -t presubmit-only
if: "always() && steps.functions_framework_pub_upgrade.conclusion == 'success'"
working-directory: functions_framework
- id: integration_test_pub_upgrade
name: integration_test; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: integration_test
- name: "integration_test; dart test --run-skipped -t presubmit-only"
run: dart test --run-skipped -t presubmit-only
if: "always() && steps.integration_test_pub_upgrade.conclusion == 'success'"
working-directory: integration_test
job_005:
name: "unit_test; macos; Dart 3.0.0; PKG: google_cloud; `dart test`"
runs-on: macos-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: "~/.pub-cache/hosted"
key: "os:macos-latest;pub-cache-hosted;sdk:3.0.0;packages:google_cloud;commands:test_0"
restore-keys: |
os:macos-latest;pub-cache-hosted;sdk:3.0.0;packages:google_cloud
os:macos-latest;pub-cache-hosted;sdk:3.0.0
os:macos-latest;pub-cache-hosted
os:macos-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
with:
sdk: "3.0.0"
- id: checkout
name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- id: google_cloud_pub_upgrade
name: google_cloud; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: google_cloud
- name: google_cloud; dart test
run: dart test
if: "always() && steps.google_cloud_pub_upgrade.conclusion == 'success'"
working-directory: google_cloud
job_006:
name: "unit_test; macos; Dart dev; PKG: google_cloud; `dart test`"
runs-on: macos-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
with:
path: "~/.pub-cache/hosted"
key: "os:macos-latest;pub-cache-hosted;sdk:dev;packages:google_cloud;commands:test_0"
restore-keys: |
os:macos-latest;pub-cache-hosted;sdk:dev;packages:google_cloud
os:macos-latest;pub-cache-hosted;sdk:dev
os:macos-latest;pub-cache-hosted
os:macos-latest
- name: Setup Dart SDK
uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
with:
sdk: dev
- id: checkout
name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- id: google_cloud_pub_upgrade
name: google_cloud; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: google_cloud
- name: google_cloud; dart test
run: dart test
if: "always() && steps.google_cloud_pub_upgrade.conclusion == 'success'"
working-directory: google_cloud
job_007:
name: "unit_test; windows; Dart dev; PKG: google_cloud; `dart test`"
runs-on: windows-latest
steps:
- name: Setup Dart SDK
uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
with:
sdk: dev
- id: checkout
name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- id: google_cloud_pub_upgrade
name: google_cloud; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: google_cloud
- name: google_cloud; dart test
run: dart test
if: "always() && steps.google_cloud_pub_upgrade.conclusion == 'success'"
working-directory: google_cloud
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}'}" \
"${CHAT_WEBHOOK_URL}"
env:
CHAT_WEBHOOK_URL: "${{ secrets.CHAT_WEBHOOK_URL }}"
needs:
- job_001
- job_002
- job_003
- job_004
- job_005
- job_006
- job_007