-
Notifications
You must be signed in to change notification settings - Fork 153
56 lines (46 loc) · 1.71 KB
/
eval.yaml
File metadata and controls
56 lines (46 loc) · 1.71 KB
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
50
51
52
53
54
55
name: eval-workflow
on:
push:
# Workflow runs on push to any branch.
schedule:
- cron: "0 * * * *" # hourly
# TODO(polina-c): add steps that run tests
jobs:
eval-job:
runs-on: ubuntu-latest
environment: eval
steps:
- name: Check that REPO_GEMINI_API_KEY is set and available
env:
# REPO_GEMINI_API_KEY is expected to be set in the repository secrets
# See https://docs.github.com/en/actions/security-guides/encrypted-secrets
GEMINI_API_KEY: ${{ secrets.REPO_GEMINI_API_KEY }}
run: |
if [ -z "$GEMINI_API_KEY" ]; then
echo "ERROR: REPO_GEMINI_API_KEY is not set"
exit 1
fi
echo "GEMINI_API_KEY has ${#GEMINI_API_KEY} characters"
- name: Install Flutter
uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046
with:
channel: beta
cache: true
- name: Print Flutter version
run: flutter --version
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Install dependencies
working-directory: examples/eval
run: dart pub get
- name: Run eval tests
working-directory: examples/eval
env:
GEMINI_API_KEY: ${{ secrets.REPO_GEMINI_API_KEY }}
run: flutter test --dart-define=GEMINI_API_KEY=$GEMINI_API_KEY
- name: Cache dependencies
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306
with:
path: ${{ env.PUB_CACHE }}
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-