Skip to content

Merge branch 'google:master' into master #1

Merge branch 'google:master' into master

Merge branch 'google:master' into master #1

name: Verify Examples
on:
push:
branches:
- main
- master
pull_request:
schedule:
- cron: "0 0 * * 0"
defaults:
run:
shell: bash
env:
PUB_ENVIRONMENT: bot.github
jobs:
verify_examples:
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:${{ matrix.example_directory }}"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;dart:dev
os:ubuntu-latest;pub-cache-hosted
os:ubuntu-latest
- uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
with:
sdk: dev
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- run: |
pushd discoveryapis_generator
dart pub upgrade
popd
- run: tool/verify_examples_setup.sh
- name: verify output
run: |
export DIFF_OUTPUT="$(git diff)"
if [[ $DIFF_OUTPUT ]]; then
echo "::error::Build needs to be re-run!"
echo "::group::git diff"
echo "$DIFF_OUTPUT"
echo "::endgroup::"
exit 1
else
echo "Build output is all good!"
fi