-
Notifications
You must be signed in to change notification settings - Fork 120
49 lines (48 loc) · 1.28 KB
/
verify_examples.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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@6849a6489940f00c2f30c0fb92c6274307ccb58a
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@0a8a0fc875eb934c15d08629302413c671d3f672
with:
sdk: dev
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- 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