Merge pull request #106 from rishabhrawat05/main #115
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: Automated Testing | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- 'main' | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
# - name: Cache Maven dependencies | |
# uses: actions/cache@v3 | |
# with: | |
# path: ~/.m2/repository | |
# key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
# restore-keys: | | |
# ${{ runner.os }}-maven- | |
- name: Install dependencies | |
run: mvn clean install -DskipTests | |
- name: Run Tests | |
run: mvn test | |
env: | |
ENV: production | |
DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
DATABASE_USERNAME: ${{ secrets.DATABASE_USERNAME }} | |
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }} | |
DATABASE_DRIVER_CLASS_NAME: ${{ secrets.DATABASE_DRIVER_CLASS_NAME }} | |
MAIL_SERVICE_HOST: ${{ secrets.MAIL_SERVICE_HOST }} | |
MAIL_SERVICE_PORT: ${{ secrets.MAIL_SERVICE_PORT }} | |
MAIL_SERVICE_USERNAME: ${{ secrets.MAIL_SERVICE_USERNAME }} | |
MAIL_SERVICE_PASSWORD: ${{ secrets.MAIL_SERVICE_PASSWORD }} | |
MAIL_SERVICE_SMTP: ${{ secrets.MAIL_SERVICE_SMTP }} | |
MAIL_SERVICE_STARTTLS: ${{ secrets.MAIL_SERVICE_STARTTLS }} | |
MAIL_SERVICE_DOMAIN_NAME: ${{ secrets.MAIL_SERVICE_DOMAIN_NAME }} | |
# lint-and-format: | |
# runs-on: ubuntu-latest | |
# needs: build-and-test | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v3 | |
# | |
# - name: Set up JDK 17 | |
# uses: actions/setup-java@v3 | |
# with: | |
# java-version: '17' | |
# distribution: 'temurin' | |
# | |
# - name: Run Checkstyle | |
# run: mvn checkstyle:check | |
# | |
# - name: Run PMD | |
# run: mvn pmd:check | |
# | |
# - name: Run SpotBugs | |
# run: mvn spotbugs:check | |
# - name: Verify code formatting with Spotless (excluding Javadocs) | |
# run: mvn spotless:check -Dspotless.apply.skip |