-
Notifications
You must be signed in to change notification settings - Fork 7
66 lines (58 loc) · 1.72 KB
/
dart_test.yml
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
name: Run Dart Test with Misskey Develop Branch
on:
workflow_dispatch:
schedule:
- cron: "0 7 * * *"
jobs:
test_with_misskey_develop:
runs-on: ubuntu-latest
permissions:
contents: read
services:
db:
image: postgres:13
ports:
- 5432:5432
env:
POSTGRES_DB: misskey
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_USER: example-misskey-user
POSTGRESS_PASS: example-misskey-pass
redis:
image: redis:7
ports:
- 6379:6379
app:
image: misskey/misskey:develop
ports:
- 3000:3000
volumes:
- /test/testenv/.config/default.yml:/misskey/.config/default.yml
steps:
- name: Wait for Misskey to be ready
run: |
MAX_RETRIES=12
RETRY_DELAY=5
count=0
until $(curl --output /dev/null --silent --head --fail http://localhost:3000) || [[ $count -eq $MAX_RETRIES ]]; do
printf '.'
sleep $RETRY_DELAY
count=$((count + 1))
done
if [[ $count -eq $MAX_RETRIES ]]; then
echo "Failed to connect to Misskey after $MAX_RETRIES attempts."
exit 1
fi
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Run flutter version
run: flutter --version
- name: Run flutter pub get
run: flutter pub get
- name: Run flutter test with coverage
run: flutter test --coverage --coverage-path=~/coverage/lcov.info