-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cicd: create temporal manual cicd Junit test #TASK-6252
- Loading branch information
1 parent
596816d
commit 0ce422e
Showing
1 changed file
with
44 additions
and
0 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,44 @@ | ||
name: Manual Junit test the project | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: 'Opencga branch to run the tests' | ||
default: 'develop' | ||
required: true | ||
|
||
jobs: | ||
test: | ||
name: Test and push Sonar analysis | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.inputs.branch }} | ||
fetch-depth: '0' | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
cache: 'maven' | ||
- name: K8s Tunnel MongoDB | ||
run: | | ||
wget https://dl.k8s.io/release/v1.28.2/bin/linux/amd64/kubectl | ||
chmod +x ./kubectl | ||
echo "${{ secrets.AZURE_KUBE_CONFIG }}" > admin.conf | ||
./kubectl -n cellbase-db port-forward services/cellbase-rs0-svc 27017:27017 --kubeconfig ./admin.conf & | ||
- name: Install dependencies branches | ||
run: | | ||
if [ -f "./.github/workflows/scripts/get_same_branch.sh" ]; then | ||
chmod +x ./.github/workflows/scripts/get_same_branch.sh | ||
./.github/workflows/scripts/get_same_branch.sh ${{ github.ref_name }} | ||
else | ||
echo "./.github/workflows/scripts/get_same_branch.sh does not exist." | ||
fi | ||
- name: Test and Analyze | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: mvn -B verify surefire-report:report --fail-never |