fix(devops): change to relative path #2
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: backend-worklow | |
on: | |
push: | |
paths: | |
- 'backend/**' | |
- docker-compose.yml | |
- docker-compose.dev.yml | |
- '.github/workflows/backend_build.yml' | |
pull_request: | |
branches: | |
- main | |
- staging | |
- develop | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
working-directory: | |
backend | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Maven | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Build Docker backend-dev Image | |
run: docker-compose -f ../docker-compose.dev.yml build db-dev | |
- name: Run Docker backend-dev Container | |
run: docker-compose -f ../docker-compose.dev.yml up -d db-dev | |
- name: Run Tests | |
run: mvn clean test | |
- name: Stop Docker backend-dev Container | |
run: docker-compose -f ../docker-compose.dev.yml down | |
- name: Build Docker backend-prod Image | |
run: docker-compose -f ../docker-compose.yml build db | |
- name: Run Docker backend-prod Container | |
run: docker-compose -f ../docker-compose.yml up -d db | |
- name: Run Tests | |
run: mvn clean test | |
- name: Stop Docker backend-prod Container | |
run: docker-compose -f ../docker-compose.yml down | |