-
Notifications
You must be signed in to change notification settings - Fork 4
81 lines (76 loc) · 2.32 KB
/
ci.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Flutter CI
on:
push:
branches:
- security-center
pull_request:
workflow_dispatch:
jobs:
analyze:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: asdf-vm/actions/install@v2
- run: flutter pub get
- run: dart run build_runner build -d
- uses: actions/cache@v3
with:
path: |
./**/*.freezed.dart
./**/*.g.dart
./**/*.mocks.dart
key: build_runner-${{ github.sha }}
- run: flutter analyze --fatal-infos
format:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: asdf-vm/actions/install@v2
- run: >
find . -name '*.dart'
! -name '*.freezed.dart'
! -name '*.g.dart'
! -name '*.mocks.dart'
! -path '*/l10n/*.dart'
! -name '*.pb*.dart'
! -path '*/.*/*'
| xargs dart format --set-exit-if-changed
test:
needs: analyze
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: asdf-vm/actions/install@v2
- uses: actions/cache@v3
with:
path: |
./**/*.freezed.dart
./**/*.g.dart
./**/*.mocks.dart
key: build_runner-${{ github.sha }}
- run: sudo apt update && sudo apt install -y lcov
- run: flutter test --coverage
- uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}
security-center:
needs: analyze
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: asdf-vm/actions/install@v2
- uses: actions/cache@v3
with:
path: |
./**/*.freezed.dart
./**/*.g.dart
./**/*.mocks.dart
key: build_runner-${{ github.sha }}
- run: |
sudo apt update
sudo apt install -y clang cmake libglib2.0-dev libgtk-3-dev liblzma-dev ninja-build pkg-config polkitd xvfb
sudo snap refresh snapd --channel=latest/edge/prompting
sudo snap install --edge prompting-client
sudo snap set system experimental.apparmor-prompting=true
sudo cp integration_test/assets/snapd-ci.pkla /var/lib/polkit-1/localauthority/50-local.d/
xvfb-run -a -s '-screen 0 1024x768x24 +extension GLX' flutter test integration_test