New Crowdin updates #653
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
name: Build and Test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: | |
- '!l10n_master' | |
jobs: | |
build: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Cache Maven packages | |
uses: actions/cache@v1 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Build | |
#if: 0 | |
run: mvn -B install -DskipTests | |
- name: Generate DB schema | |
#if: 0 | |
run: mvn -f core/pom.xml org.andromda.maven.plugins:andromdapp-maven-plugin:schema -Dtasks=create | |
- name: Create 'ctsms' user | |
run: | | |
sudo useradd ctsms -p '*' --groups sudo | |
- name: Start PostgreSQL | |
run: | | |
#sudo apt-get install --yes postgresql | |
sudo service postgresql start | |
- name: Create DB schema | |
#if: 0 | |
run: | | |
sudo -u postgres psql postgres -c "CREATE USER ctsms WITH PASSWORD 'ctsms';" | |
sudo -u postgres psql postgres -c "CREATE DATABASE ctsms;" | |
sudo -u postgres psql postgres -c "GRANT ALL PRIVILEGES ON DATABASE ctsms to ctsms;" | |
sudo -u ctsms psql -U ctsms ctsms < /home/runner/work/ctsms/ctsms/core/db/schema-create.sql | |
sudo -u ctsms psql -U ctsms ctsms < /home/runner/work/ctsms/ctsms/core/db/index-create.sql | |
- name: Download master data | |
run: | | |
sudo mkdir /ctsms | |
sudo wget --no-check-certificate --content-disposition https://github.com/phoenixctms/config-default/archive/master.tar.gz -O /ctsms/config.tar.gz | |
sudo tar -zxvf /ctsms/config.tar.gz -C /ctsms --strip-components 1 | |
sudo rm /ctsms/config.tar.gz -f | |
sudo wget https://api.github.com/repos/phoenixctms/master-data/tarball/master -O /ctsms/master-data.tar.gz | |
sudo mkdir /ctsms/master_data | |
sudo tar -zxvf /ctsms/master-data.tar.gz -C /ctsms/master_data --strip-components 1 | |
sudo rm /ctsms/master-data.tar.gz -f | |
sudo chown ctsms:ctsms /ctsms -R | |
sudo chmod 777 /ctsms -R | |
- name: Configure email sender | |
env: | |
MAIL_SENDER_HOST: ${{ secrets.MAIL_SENDER_HOST }} | |
MAIL_SENDER_PORT: ${{ secrets.MAIL_SENDER_PORT }} | |
MAIL_SENDER_PROTOCOL: ${{ secrets.MAIL_SENDER_PROTOCOL }} | |
MAIL_SENDER_USERNAME: ${{ secrets.MAIL_SENDER_USERNAME }} | |
MAIL_SENDER_PASSWORD: ${{ secrets.MAIL_SENDER_PASSWORD }} | |
MAIL_SENDER_AUTH: ${{ secrets.MAIL_SENDER_AUTH }} | |
MAIL_SENDER_STARTTLS: ${{ secrets.MAIL_SENDER_STARTTLS }} | |
MAIL_SENDER_ADDRESS: ${{ secrets.MAIL_SENDER_ADDRESS }} | |
run: | | |
sudo echo "email_exec_from_address=$MAIL_SENDER_ADDRESS" >> /ctsms/properties/ctsms-settings.properties | |
sudo echo "email_exec_from_name=Phoenix CTSMS Automated Tests" >> /ctsms/properties/ctsms-settings.properties | |
sudo echo "job_mail_sender_host=$MAIL_SENDER_HOST" >> /ctsms/properties/ctsms-applicationcontext.properties | |
sudo echo "job_mail_sender_port=$MAIL_SENDER_PORT" >> /ctsms/properties/ctsms-applicationcontext.properties | |
sudo echo "job_mail_sender_protocol=$MAIL_SENDER_PROTOCOL" >> /ctsms/properties/ctsms-applicationcontext.properties | |
sudo echo "job_mail_sender_username=$MAIL_SENDER_USERNAME" >> /ctsms/properties/ctsms-applicationcontext.properties | |
sudo echo "job_mail_sender_password=$MAIL_SENDER_PASSWORD" >> /ctsms/properties/ctsms-applicationcontext.properties | |
sudo touch /ctsms/properties/ctsms-job-mail-sender.properties | |
sudo chown ctsms:ctsms /ctsms/properties/ctsms-job-mail-sender.properties | |
sudo chmod 777 /ctsms/properties/ctsms-job-mail-sender.properties | |
sudo echo "mail.smtp.auth=$MAIL_SENDER_AUTH" >> /ctsms/properties/ctsms-job-mail-sender.properties | |
sudo echo "mail.smtp.starttls.enable=$MAIL_SENDER_STARTTLS" >> /ctsms/properties/ctsms-job-mail-sender.properties | |
- name: Setup dbtool.sh | |
run: | | |
sudo chown ctsms:ctsms /home/runner/work/ctsms/ctsms/.github/workflows/dbtool.sh | |
sudo chmod 755 /home/runner/work/ctsms/ctsms/.github/workflows/dbtool.sh | |
- name: Initialize DB | |
run: | | |
sudo -u ctsms /home/runner/work/ctsms/ctsms/.github/workflows/dbtool.sh -i -f | |
- name: Setup query criteria | |
run: | | |
sudo -u ctsms /home/runner/work/ctsms/ctsms/.github/workflows/dbtool.sh -icp /ctsms/master_data/criterion_property_definitions.csv | |
- name: Setup service method permissions | |
run: | | |
sudo -u ctsms /home/runner/work/ctsms/ctsms/.github/workflows/dbtool.sh -ipd /ctsms/master_data/permission_definitions.csv | |
- name: Setup degrees and titles | |
if: 0 | |
run: | | |
sudo -u ctsms /home/runner/work/ctsms/ctsms/.github/workflows/dbtool.sh -it /ctsms/master_data/titles.csv -e ISO-8859-1 | |
- name: Setup mime types | |
run: | | |
sudo -u ctsms /home/runner/work/ctsms/ctsms/.github/workflows/dbtool.sh -imi /ctsms/master_data/mime.types -e ISO-8859-1 | |
sudo -u ctsms /home/runner/work/ctsms/ctsms/.github/workflows/dbtool.sh -ims /ctsms/master_data/mime.types -e ISO-8859-1 | |
sudo -u ctsms /home/runner/work/ctsms/ctsms/.github/workflows/dbtool.sh -imc /ctsms/master_data/mime.types -e ISO-8859-1 | |
sudo -u ctsms /home/runner/work/ctsms/ctsms/.github/workflows/dbtool.sh -imt /ctsms/master_data/mime.types -e ISO-8859-1 | |
sudo -u ctsms /home/runner/work/ctsms/ctsms/.github/workflows/dbtool.sh -imp /ctsms/master_data/mime.types -e ISO-8859-1 | |
sudo -u ctsms /home/runner/work/ctsms/ctsms/.github/workflows/dbtool.sh -immm /ctsms/master_data/mime.types -e ISO-8859-1 | |
sudo -u ctsms /home/runner/work/ctsms/ctsms/.github/workflows/dbtool.sh -imifi /ctsms/master_data/mime.types -e ISO-8859-1 | |
sudo -u ctsms /home/runner/work/ctsms/ctsms/.github/workflows/dbtool.sh -imsi /ctsms/master_data/mime.types -e ISO-8859-1 | |
sudo -u ctsms /home/runner/work/ctsms/ctsms/.github/workflows/dbtool.sh -impi /ctsms/master_data/mime.types -e ISO-8859-1 | |
sudo -u ctsms /home/runner/work/ctsms/ctsms/.github/workflows/dbtool.sh -imjf /ctsms/master_data/mime.types -e ISO-8859-1 | |
sudo -u ctsms /home/runner/work/ctsms/ctsms/.github/workflows/dbtool.sh -imcc /ctsms/master_data/mime.types -e ISO-8859-1 | |
- name: Run testsuite | |
run: | | |
sudo -u ctsms /home/runner/work/ctsms/ctsms/.github/workflows/dbtool.sh -ldd -f -er [email protected] |