-
Notifications
You must be signed in to change notification settings - Fork 2
86 lines (72 loc) · 3.16 KB
/
main2.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: KOJA CI/CD
on:
push:
branches:
- main
pull_request:
branches:
- dev
jobs:
build_and_test_flutter:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Create .env
run: |
echo KOJA_AWS_RDS_DATABASE_URL=${{ secrets.KOJA_AWS_RDS_DATABASE_URL }} >> client/assets/.env
echo KOJA_AWS_RDS_DATABASE_ADMIN_USERNAME=${{ secrets.KOJA_AWS_RDS_DATABASE_ADMIN_USERNAME }} >> client/assets/.env
echo KOJA_AWS_RDS_DATABASE_ADMIN_PASSWORD=${{ secrets.KOJA_AWS_RDS_DATABASE_ADMIN_PASSWORD }} >> client/assets/.env
echo GOOGLE_CLIENT_ID=${{ secrets.GOOGLE_CLIENT_ID }} >> client/assets/.env
echo GOOGLE_CLIENT_SECRET=${{ secrets.GOOGLE_CLIENT_SECRET }} >> client/assets/.env
echo KOJA_JWT_SECRET=${{ secrets.KOJA_JWT_SECRET }} >> client/assets/.env
echo COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }} >> client/assets/.env
echo API_KEY=${{ secrets.API_KEY }} >> client/assets/.env
echo OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} >> client/assets/.env
echo SERVER_ADDRESS=${{ secrets.SERVER_ADDRESS }} >> client/assets/.env
echo SERVER_PORT=${{ secrets.SERVER_PORT }} >> client/assets/.env
- name: Set up Flutter
uses: subosito/flutter-action@v1
with:
flutter-version: '3.10'
- name: Install Flutter dependencies
run: flutter pub get
working-directory: client
- name: Run Flutter linter
run: flutter analyze
working-directory: client
- name: Run Flutter Tests
run: flutter test
working-directory: client
- name: Build Flutter app
run: flutter build apk
working-directory: client
build_and_test_springboot:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 17
- name: Create .env
run: |
echo KOJA_AWS_RDS_DATABASE_URL=${{ secrets.KOJA_AWS_RDS_DATABASE_URL }} >> .env
echo KOJA_AWS_RDS_DATABASE_ADMIN_USERNAME=${{ secrets.KOJA_AWS_RDS_DATABASE_ADMIN_USERNAME }} >> .env
echo KOJA_AWS_RDS_DATABASE_ADMIN_PASSWORD=${{ secrets.KOJA_AWS_RDS_DATABASE_ADMIN_PASSWORD }} >> .env
echo GOOGLE_CLIENT_ID=${{ secrets.GOOGLE_CLIENT_ID }} >> .env
echo GOOGLE_CLIENT_SECRET=${{ secrets.GOOGLE_CLIENT_SECRET }} >> .env
echo KOJA_JWT_SECRET=${{ secrets.KOJA_JWT_SECRET }} >> .env
echo COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }} >> .env
echo API_KEY=${{ secrets.API_KEY }} >> .env
echo OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} >> .env
echo SERVER_ADDRESS=${{ secrets.SERVER_ADDRESS }} >> .env
echo SERVER_PORT=${{ secrets.SERVER_PORT }} >> .env
- name: Run Linter
run: ./gradlew ktlintCheck
- name: Run Tests
run: ./gradlew test
- name: Build Spring Boot project
run: ./gradlew build -x test -x check