| name: CI/CD Pipeline for Research Platform | |
| on: | |
| push: | |
| branches: [ "main", "master" ] | |
| pull_request: | |
| branches: [ "main", "master" ] | |
| jobs: | |
| backend-test-and-build: | |
| name: Backend - Test & Build (Java 17) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Run Backend Tests | |
| run: mvn -B test | |
| - name: Package Backend JAR | |
| run: mvn -B package -DskipTests | |
| - name: Upload Backend Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: backend-jar | |
| path: target/*.jar | |
| frontend-test-and-build: | |
| name: Frontend - Test & Build (Node.js) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./front | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'yarn' | |
| cache-dependency-path: './front/yarn.lock' | |
| - name: Install Frontend Dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Build Frontend Application | |
| run: yarn build | |
| - name: Upload Frontend Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: frontend-dist | |
| path: front/dist/ | |
| docker-build-and-verify: | |
| name: Docker - Build Images and Verify Composition | |
| runs-on: ubuntu-latest | |
| needs: [backend-test-and-build, frontend-test-and-build] | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Download Backend Artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: backend-jar | |
| path: target/ | |
| - name: Download Frontend Artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: frontend-dist | |
| path: front/dist/ | |
| - name: Verify Artifacts | |
| run: | | |
| ls -la target/ | |
| ls -la front/dist/ | |
| - name: Build Docker Compose Stack | |
| run: docker-compose build | |
| - name: Start Docker Compose Stack (Detached) | |
| run: docker-compose up -d | |
| - name: Wait for Services to Start | |
| run: sleep 15 | |
| - name: Verify Running Containers | |
| run: docker-compose ps | |
| - name: Stop Docker Compose Stack | |
| run: docker-compose down | |
Xet Storage Details
- Size:
- 2.42 kB
- Xet hash:
- 7c5b384759ddc7ae90609158a0287c967e300d8ce103cf5ab873acbf597ac58c
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.