Skip to content

Commit

Permalink
Feature/add nightly without sonar (#459)
Browse files Browse the repository at this point in the history
* Add first github workflow file (nightly)

* update first github workflow triggert by push event

* update first github workflow deactivate int tests and cirlceCi pipline

* update first github workflow remove Int Test folder

* update first github workflow add Int Test folder

* update first github workflow add Int Test again

* update first github workflow schedule job

* update first github workflow schedule job I

* add nightly as github workflow

* disable sonar
  • Loading branch information
mafasva authored Feb 7, 2024
1 parent 01e08aa commit edf25a1
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ workflows:
build_and_test:
jobs:
- test:
context:
context:
- org-global
- ms_teams
- tag-version:
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
path: ~/test-results/unit-tests/
- store_test_results:
path: ~/test-results/integration-tests/
- sonarcloud/scan
# - sonarcloud/scan
- cache-in-maven-dependencies
- jq/install
- run:
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
)
echo "$MS_TEAMS_MSG_TEMPLATE" > /tmp/ms_teams_message
when: always
- run:
- run:
name: Report Build Success
command: |
MSG_PATH=/tmp/ms_teams_success_message
Expand All @@ -146,7 +146,7 @@ jobs:
MSG_PATH=/tmp/ms_teams_failure_message
sed -e 's/__build_status__/Failed/' -e 's/__theme_color__/e2091d/' /tmp/ms_teams_message > $MSG_PATH
curl --fail -H "Content-Type: application/json" --data-binary @$MSG_PATH $CODEX_NOTIFICATIONS
when: on_fail
when: on_fail
tag-version:
docker:
- image: cimg/openjdk:17.0.8
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: nightly test run
on:
schedule:
- cron: '0 22 * * *'

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Run unit tests
run: mvn clean test
- name: Run integration tests
run: mvn verify -P integration-tests
- name: Save test results
run: |
mkdir -p ~/test-results/unit-tests/
mkdir -p ~/test-results/integration-tests/
find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/test-results/unit-tests/ \;
find . -type f -regex ".*/target/failsafe-reports/.*xml" -exec cp {} ~/test-results/integration-tests/ \;
- name: Run CVE scan
run: mvn dependency-check:check
- name: Upload test coverage report
uses: actions/upload-artifact@v4
with:
name: test-coverage-report
path: target/site/jacoco-merged-test-coverage-report
- name: Upload dependency check report
uses: actions/upload-artifact@v4
with:
name: dependency-check-report
path: target/dependency-check-report.html
- name: Upload unit tests report
uses: actions/upload-artifact@v4
with:
name: unit-tests-report
path: ~/test-results/unit-tests/
- name: Upload integration tests report
uses: actions/upload-artifact@v4
with:
name: integration-tests-report
path: ~/test-results/integration-tests/
#- name: SonarCloud Scan
# uses: sonarsource/[email protected]
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 comments on commit edf25a1

Please sign in to comment.