AYS-521 | Documents Editing (#47) #15
This file contains 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 for check application health. | |
# Name of the workflow | |
name: Application Status | |
on: | |
push: | |
branches: | |
- main # Trigger the workflow when a push event occurs on the main branch | |
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 ui.url in configuration.properties # Step to replace the placeholder api.url in configuration.properties | |
run: sed 's|'{UI_URL}'|'${{ secrets.AYS_UI_URL }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace test_volunteer_foundation.super_admin.email_address in configuration.properties # Step to replace the placeholder test_volunteer_foundation.super_admin.email_address in configuration.properties | |
run: sed 's|'{TEST_VOLUNTEER_FOUNDATION_SUPER_ADMIN_EMAIL_ADDRESS}'|'${{ secrets.AYS_TEST_VOLUNTEER_FOUNDATION_SUPER_ADMIN_EMAIL_ADDRESS }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace test_volunteer_foundation.super_admin.password in configuration.properties # Step to replace the placeholder test_volunteer_foundation.super_admin.password in configuration.properties | |
run: sed 's|'{TEST_VOLUNTEER_FOUNDATION_SUPER_ADMIN_PASSWORD}'|'${{ secrets.AYS_TEST_VOLUNTEER_FOUNDATION_SUPER_ADMIN_PASSWORD }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace test_volunteer_foundation.admin.email_address in configuration.properties # Step to replace the placeholder test_volunteer_foundation.admin.email_address in configuration.properties | |
run: sed 's|'{TEST_VOLUNTEER_FOUNDATION_ADMIN_EMAIL_ADDRESS}'|'${{ secrets.AYS_TEST_VOLUNTEER_FOUNDATION_ADMIN_EMAIL_ADDRESS }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace test_volunteer_foundation.admin.password in configuration.properties # Step to replace the placeholder test_volunteer_foundation.admin.password in configuration.properties | |
run: sed 's|'{TEST_VOLUNTEER_FOUNDATION_ADMIN_PASSWORD}'|'${{ secrets.AYS_TEST_VOLUNTEER_FOUNDATION_ADMIN_PASSWORD }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace test_volunteer_foundation.user.email_address in configuration.properties # Step to replace the placeholder test_volunteer_foundation.user.email_address in configuration.properties | |
run: sed 's|'{TEST_VOLUNTEER_FOUNDATION_USER_EMAIL_ADDRESS}'|'${{ secrets.AYS_TEST_VOLUNTEER_FOUNDATION_USER_EMAIL_ADDRESS }}'|g' configuration.properties >> temp_configuration.properties ; rm configuration.properties ; mv temp_configuration.properties configuration.properties | |
- name: Replace test_volunteer_foundation.user.password in configuration.properties # Step to replace the placeholder test_volunteer_foundation.user.password in configuration.properties | |
run: sed 's|'{TEST_VOLUNTEER_FOUNDATION_USER_PASSWORD}'|'${{ secrets.AYS_TEST_VOLUNTEER_FOUNDATION_USER_PASSWORD }}'|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 |