-
Notifications
You must be signed in to change notification settings - Fork 2
86 lines (71 loc) · 2.32 KB
/
ci.yml
File metadata and controls
86 lines (71 loc) · 2.32 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: CI
on:
pull_request:
branches: [main]
env:
MIN_COVERAGE: ${{ vars.MIN_COVERAGE }}
jobs:
ci:
name: Lint, Test & Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
dart-version: ${{ vars.DART_VERSION }}
- name: Install tools
run: |
npm install -g cspell
dart pub global activate coverage
- name: Get all dependencies
run: |
for dir in packages/* examples/* tools/build; do
if [ -d "$dir" ] && [ -f "$dir/pubspec.yaml" ]; then
echo "::group::$dir"
cd $dir && dart pub get && cd - > /dev/null
echo "::endgroup::"
fi
done
- name: Install npm dependencies
run: |
for dir in packages/* examples/*; do
if [ -d "$dir" ] && [ -f "$dir/package.json" ]; then
echo "::group::npm install $dir"
cd $dir && npm install && cd - > /dev/null
echo "::endgroup::"
fi
done
- name: Spell check
run: cspell "**/*.md" "**/*.dart" "**/*.ts" --no-progress
- name: Check formatting
run: |
dart format --set-exit-if-changed packages/
dart format --set-exit-if-changed examples/
dart format --set-exit-if-changed tools/build
- name: Analyze
run: |
for dir in packages/* examples/* tools/build; do
if [ -d "$dir" ] && [ -f "$dir/pubspec.yaml" ]; then
echo "::group::Analyzing $dir"
cd $dir && dart analyze --no-fatal-warnings && cd - > /dev/null
echo "::endgroup::"
fi
done
- name: Test Tier 1
run: ./tools/test.sh --ci --tier 1
- name: Test Tier 2
run: ./tools/test.sh --ci --tier 2
- name: Test Tier 3
run: ./tools/test.sh --ci --tier 3
- name: Setup Node.js for website tests
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: website/package-lock.json
- name: Install website dependencies
working-directory: website
run: npm ci
- name: Run website tests
working-directory: website
run: bash scripts/test.sh