Skip to content

Merge Feature/GenerateSuggestedCalendar into Dev #44

Merge Feature/GenerateSuggestedCalendar into Dev

Merge Feature/GenerateSuggestedCalendar into Dev #44

Workflow file for this run

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