Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor workflow to flow maven apache build life cycle #88

Merged
merged 5 commits into from
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 20 additions & 17 deletions .github/workflows/develop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,18 @@ on:
- main

jobs:
build:

test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
architecture: x64
java-version: '17'
distribution: 'temurin'

- name: Cache Maven packages
uses: actions/cache@v2
with:
Expand All @@ -43,23 +41,24 @@ jobs:
</servers>
</settings>" > ~/.m2/settings.xml

- name: Run Unit and Integration Tests
run: mvn verify -s ~/.m2/settings.xml -Dmaven.javadoc.skip=true

- name: Build with webank Online banking
run: mvn clean install -s ~/.m2/settings.xml -DskipTests -DskipITs -Dmaven.javadoc.skip=true

# 2. Test Stage
test:
build:

runs-on: ubuntu-latest
needs: build

steps:
- name: Checkout Repository
uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: 17
architecture: x64
distribution: 'temurin'

- name: Cache Maven packages
uses: actions/cache@v2
with:
Expand All @@ -80,10 +79,14 @@ jobs:
</servers>
</settings>" > ~/.m2/settings.xml

- name: Run Unit and Integration Tests
run: mvn verify -s ~/.m2/settings.xml -Dmaven.javadoc.skip=true

- name: Build with webank Online banking
run: mvn clean install -s ~/.m2/settings.xml -DskipTests -DskipITs -Dmaven.javadoc.skip=true



security-scan:
name: Owasp security scan
runs-on: ubuntu-latest
needs: build # Ensures that the security scan runs only if the build job succeeds

Expand Down Expand Up @@ -120,7 +123,7 @@ jobs:
path: ${{ github.workspace }}/reports

Sonarqube:
name: Build and analyze
name: Sonarqube
runs-on: ubuntu-latest

steps:
Expand Down
Loading