AYS-441 | Project Infrastructure Has Been Created and Codes Have Been Improved #129
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Purpose: This file is used to build the project when a pull request is opened, reopened, edited, synchronized, ready for review, or unlocked. | |
# Name of the workflow | |
name: Pull Request Checker | |
# Trigger the workflow when various types of pull request events occur | |
on: | |
pull_request: | |
types: | |
- opened # triggers the workflow when a pull request is opened. | |
- reopened # triggers the workflow when a pull request is reopened after being closed. | |
- edited # triggers the workflow when a pull request is edited (changes are made to the pull request (the title, description, assignees, labels, or other attributes of the pull request)) | |
- synchronize # triggers the workflow when a pull request is synchronized (changes are pushed to the branch associated with the pull request) | |
- ready_for_review # triggers the workflow when a pull request is marked as ready for review | |
- unlocked # triggers the workflow when a previously locked pull request is unlocked | |
jobs: | |
build: # Define the "build" job | |
runs-on: ubuntu-latest # Run the job on the latest version of Ubuntu | |
steps: # List of steps to execute within the job | |
- name: Update package cache # Step to update the package cache | |
run: sudo apt-get update | |
- name: Checkout code # Step to check out the code from the repository | |
uses: actions/checkout@v3 | |
- name: Set up Java # Step to set up the Java environment | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 # Specify Java 17 as the version | |
distribution: 'zulu' # Use the 'zulu' distribution of Java | |
- name: Install Maven # Step to install Maven | |
run: sudo apt-get install -y maven | |
- name: Copy configuration.properties file from template # Step to create a new 'configuration.properties' file by copying the 'template-configuration.properties' | |
run: cp sample_configuration.properties configuration.properties | |
- name: Replace api.url in configuration.properties # Step to replace the placeholder api.url in configuration.properties | |
run: sed 's|'{API_URL}'|'${{ secrets.AYS_API_URL }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace database.url in configuration.properties # Step to replace the placeholder database.url in configuration.properties | |
run: sed 's|'{DATABASE_URL}'|'${{ secrets.AYS_DATABASE_URL }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace database.username in configuration.properties # Step to replace the placeholder database.username in configuration.properties | |
run: sed 's|'{DATABASE_USERNAME}'|'${{ secrets.AYS_DATABASE_USERNAME }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace database.password in configuration.properties # Step to replace the placeholder database.password in configuration.properties | |
run: sed 's|'{DATABASE_PASSWORD}'|'${{ secrets.AYS_DATABASE_PASSWORD }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace institution.super_admin_user_one.email_address in configuration.properties # Step to replace the placeholder institution.super_admin_user_one.username in configuration.properties | |
run: sed 's|'{INSTITUTION_SUPER_ADMIN_USER_ONE_EMAIL_ADDRESS}'|'${{ secrets.AYS_INSTITUTION_SUPER_ADMIN_USER_ONE_EMAIL_ADDRESS }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace institution.super_admin_user_one.password in configuration.properties # Step to replace the placeholder institution.super_admin_user_one.password in configuration.properties | |
run: sed 's|'{INSTITUTION_SUPER_ADMIN_USER_ONE_PASSWORD}'|'${{ secrets.AYS_INSTITUTION_SUPER_ADMIN_USER_ONE_PASSWORD }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace institution_one.id in configuration.properties # Step to replace the placeholder institution_one.id in configuration.properties | |
run: sed 's|'{INSTITUTION_ONE_ID}'|'${{ secrets.AYS_INSTITUTION_ONE_ID }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace institution_one.admin_user_one.email_address in configuration.properties # Step to replace the placeholder institution_one.admin_user_one.username in configuration.properties | |
run: sed 's|'{INSTITUTION_ONE_ADMIN_USER_ONE_EMAIL_ADDRESS}'|'${{ secrets.AYS_INSTITUTION_ONE_ADMIN_USER_ONE_EMAIL_ADDRESS }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace institution_one.admin_user_one.password in configuration.properties # Step to replace the placeholder institution_one.admin_user_one.password in configuration.properties | |
run: sed 's|'{INSTITUTION_ONE_ADMIN_USER_ONE_PASSWORD}'|'${{ secrets.AYS_INSTITUTION_ONE_ADMIN_USER_ONE_PASSWORD }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace institution_one.admin_user_two.email_address in configuration.properties # Step to replace the placeholder institution_one.admin_user_one.username in configuration.properties | |
run: sed 's|'{INSTITUTION_ONE_ADMIN_USER_TWO_EMAIL_ADDRESS}'|'${{ secrets.AYS_INSTITUTION_ONE_ADMIN_USER_TWO_EMAIL_ADDRESS }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace institution_one.admin_user_two.password in configuration.properties # Step to replace the placeholder institution_one.admin_user_one.password in configuration.properties | |
run: sed 's|'{INSTITUTION_ONE_ADMIN_USER_TWO_PASSWORD}'|'${{ secrets.AYS_INSTITUTION_ONE_ADMIN_USER_TWO_PASSWORD }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace institution.test_admin.email_address in configuration.properties # Step to replace the placeholder institution.test_admin.email_address in configuration.properties | |
run: sed 's|'{INSTITUTION_TEST_ADMIN_EMAIL_ADDRESS}'|'${{ secrets.AYS_INSTITUTION_TEST_ADMIN_EMAIL_ADDRESS }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace institution.test_admin.password in configuration.properties # Step to replace the placeholder institution.test_admin.password in configuration.properties | |
run: sed 's|'{INSTITUTION_TEST_ADMIN_PASSWORD}'|'${{ secrets.AYS_INSTITUTION_TEST_ADMIN_PASSWORD }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace landing.user_one.email_address in configuration.properties # Step to replace the placeholder institution_one.admin_user_one.username in configuration.properties | |
run: sed 's|'{LANDING_USER_ONE_EMAIL_ADDRESS}'|'${{ secrets.AYS_LANDING_USER_ONE_EMAIL_ADDRESS }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace landing.user_one.password in configuration.properties # Step to replace the placeholder institution_one.admin_user_one.password in configuration.properties | |
run: sed 's|'{LANDING_USER_ONE_PASSWORD}'|'${{ secrets.AYS_LANDING_USER_ONE_PASSWORD }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace volunteer_foundation_id in configuration.properties # Step to replace the placeholder volunteer_foundation_id in configuration.properties | |
run: sed 's|'{VOLUNTEER_FOUNDATION_ID}'|'${{ secrets.AYS_VOLUNTEER_FOUNDATION_ID }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace afet_yonetim_sistemi_id in configuration.properties # Step to replace the placeholder afet_yonetim_sistemi_id in configuration.properties | |
run: sed 's|'{AFET_YONETIM_SISTEMI_ID}'|'${{ secrets.AYS_AFET_YONETIM_SISTEMI_ID }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace disaster_foundation_id in configuration.properties # Step to replace the placeholder disaster_foundation_id in configuration.properties | |
run: sed 's|'{DISASTER_FOUNDATION_ID}'|'${{ secrets.AYS_DISASTER_FOUNDATION_ID }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace test_foundation_id in configuration.properties # Step to replace the placeholder test_foundation_id in configuration.properties | |
run: sed 's|'{TEST_FOUNDATION_ID}'|'${{ secrets.AYS_TEST_FOUNDATION_ID }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Build with Maven # Step to build the project with Maven | |
run: mvn clean test -P weekly |