Skip to content

Yas Apply saga for payment process #26

Yas Apply saga for payment process

Yas Apply saga for payment process #26

name: payment-paypal service ci
on:
push:
branches: ["main"]
paths:
- "payment-paypal/**"
- ".github/workflows/actions/action.yaml"
- ".github/workflows/payment-paypal-ci.yaml"
pull_request:
branches: ["main"]
paths:
- "payment-paypal/**"
- ".github/workflows/actions/action.yaml"
- ".github/workflows/payment-paypal-ci.yaml"
workflow_dispatch:
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: ./.github/workflows/actions
- name: Run Maven Build Command
run: mvn clean install -DskipTests -f payment-paypal
- name: Run Maven Test
run: mvn test -f payment-paypal
- name: Unit Test Results
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Payment-Paypal-Unit-Test-Results
path: "payment-paypal/**/surefire-reports/*.xml"
reporter: java-junit
- name: Analyze with sonar cloud
if: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.ref == 'refs/heads/main' }}
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -f payment-paypal
- name: Log in to the Container registry
if: ${{ github.ref == 'refs/heads/main' }}
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images
if: ${{ github.ref == 'refs/heads/main' }}
uses: docker/build-push-action@v3
with:
context: ./payment-paypal
push: true
tags: ghcr.io/nashtech-garage/yas-payment-paypal:latest