Notification service #6
This file contains hidden or 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
| name: Ecommerce Microservices CI with Maven | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| #first job builds all modules and skips tests | |
| build: | |
| name: Build All Modules (skip tests) | |
| runs-on: ubuntu-latest | |
| env: | |
| FIREBASE_CONFIG_BASE64: ${{ secrets.FIREBASE_CONFIG_BASE64 }} | |
| steps: | |
| - name: Check out the repository | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Decode and save Firebase config | |
| run: echo $FIREBASE_CONFIG_BASE64 | base64 > firebase-service-account.json | |
| - name: Build all modules (skipping tests) | |
| run: mvn --batch-mode clean install -DskipTests | |
| outputs: | |
| build-status-key: ${{ steps.cache.outputs.cache-hit }} | |
| #second job runs tests on the built modules | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Check out the repository | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Run tests | |
| run: mvn --batch-mode test | |