-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement code quality and formatting checks
- Loading branch information
1 parent
4572a5c
commit 0c26b57
Showing
3 changed files
with
75 additions
and
131 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
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 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.