-
-
Notifications
You must be signed in to change notification settings - Fork 77
65 lines (54 loc) · 1.9 KB
/
test.yaml
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
56
57
58
59
60
61
62
63
64
65
name: Test
on:
# pull_request_target is dangerous! Review external PRs code before approving to run the workflow
# We need this to be able to access the secrets required by the workflow
pull_request_target:
paths-ignore:
- 'docs/**'
- 'docs_v2/**'
workflow_dispatch:
# Cancel currently running workflow when a new one is triggered
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
check:
name: Run Linter & Unit Tests
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
ref: "${{ github.event.pull_request.base.sha }}" # Required for pull_request_target
fetch-depth: 0
- name: Install Flutter
uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
with:
channel: 'stable'
- name: Set-up Flutter
run: |
flutter config --no-analytics
dart --disable-analytics
- name: Clear pub cache
run: flutter pub cache clean
- name: Install Melos
uses: bluefireteam/melos-action@68b03fa391f4242e956f7e39e9ee27c096b901e4
with:
run-bootstrap: false
- name: Bootstrap
uses: nick-invision/retry@7152eba30c6575329ac0576536151aca5a72780e
with:
timeout_minutes: 5
max_attempts: 5
delay_seconds: 5
command: melos bootstrap
- name: Run linter
run: melos lint:diff
- name: Run unit tests
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
VERTEX_AI_PROJECT_ID: ${{ secrets.VERTEX_AI_PROJECT_ID }}
VERTEX_AI_SERVICE_ACCOUNT: ${{ secrets.VERTEX_AI_SERVICE_ACCOUNT }}
run: melos test:diff