Creating PR to merge Sprint 2 into Main #3
Workflow file for this run
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
name: Budget Application CI/CD with Testing | |
on: | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
backend-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: Building backend using Maven | |
run: mvn clean install | |
working-directory: backend | |
- name: Running backend test using Maven | |
run: mvn test | |
working-directory: backend | |
frontend-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Installing frontend packages using NPM | |
run: npm ci | |
working-directory: frontend | |
- name: Building frontend using NPM | |
run: npm run build --if-present | |
working-directory: frontend | |
- name: Running frontend test using NPM | |
run: npm test | |
working-directory: frontend |