-
Notifications
You must be signed in to change notification settings - Fork 1
147 lines (129 loc) · 3.69 KB
/
flutter.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
on:
push:
branches:
- dev
paths-ignore:
- '**/README.md'
pull_request:
branches:
- dev
env:
JAVA_VERSION: "21.x"
FLUTTER_VERSION: "3.24.3"
jobs:
analyze:
name: Analyze Flutter 🔍
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java ☕
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Flutter 🐦
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Analyze solved.ac API 🔍
run: |
ls
cd packages/apis/solved_api
flutter pub get
flutter analyze
- name: Analyze BOJ API 🔍
run: |
cd packages/apis/boj_api
flutter pub get
flutter analyze
- name: Analyze User Repository 🔍
run: |
cd packages/repositories/user_repository
flutter pub get
flutter analyze
- name: Analyze Search Repository 🔍
run: |
cd packages/repositories/search_repository
flutter pub get
flutter analyze
- name: Analyze Contest Repository 🔍
run: |
cd packages/repositories/contest_repository
flutter pub get
flutter analyze
- name: Analyze My.solved 🔍
run: |
flutter pub get
flutter analyze
test:
name: Test API & Repository 🛰️
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java ☕
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Flutter 🐦
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Test solved.ac API 🛰️
run: |
cd packages/apis/solved_api
flutter test
- name: Test BOJ API 🛰️
run: |
cd packages/apis/boj_api
flutter test
- name: Test User Repository 🛰️
run: |
cd packages/repositories/user_repository
flutter test
- name: Test Search Repository 🛰️
run: |
cd packages/repositories/search_repository
flutter test
- name: Test Contest Repository 🛰️
run: |
cd packages/repositories/contest_repository
flutter test
build:
name: Build Flutter 🛠️
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java ☕
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Flutter 🐦
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Build Web 🌐
run: |
mkdir ~/.ssh
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
mkdir build
mkdir build/web
cd build/web
git init
git config --global user.name "w8385"
git config --global user.email "w8385@naver.com"
git remote add origin git@github.com:My-solved/My-solved.github.io.git
git pull origin main
git checkout main
cd ../../
flutter pub get
flutter build web --release --web-renderer html
cd build/web
git add .
git commit -m "Update web"
git push