Skip to content

Running CI/CD on arklian's commits #5634

Running CI/CD on arklian's commits

Running CI/CD on arklian's commits #5634

Workflow file for this run

name: CI/CD
run-name: Running CI/CD on ${{ github.actor }}'s commits
on:
push:
branches:
- main
pull_request:
permissions:
contents: write
issues: write
pull-requests: write
checks: write
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
backendPreTest:
name: Backend Pre Test
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Run workflow
uses: ./.github/composite/test/backend-pre-test
e2ePreTest:
name: E2E Pre Test
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Set up pnpm
uses: pnpm/action-setup@v5
with:
version: 10.24.0
cache: true
cache_dependency_path: js/pnpm-lock.yaml
package_json_file: js/package.json
- name: Run pre test
shell: bash
run: cd e2e && pnpm i && pnpm run test
backendTests:
name: Backend Tests
runs-on: ubuntu-latest
needs: backendPreTest
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Run workflow
uses: ./.github/composite/test/backend-test
with:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
frontendTests:
name: Frontend Tests
runs-on: ubuntu-latest
needs: backendPreTest
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Run workflow
uses: ./.github/composite/test/frontend-test
with:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
testBuildImage:
name: Build Test Docker Image
runs-on: ubuntu-latest
needs: backendPreTest
if: github.ref_name != 'main'
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup CI
uses: ./.github/composite/setup-ci
with:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Set up pnpm
uses: pnpm/action-setup@v5
with:
version: 10.24.0
cache: true
cache_dependency_path: js/pnpm-lock.yaml
package_json_file: js/package.json
- name: Set up OpenJDK 25
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "25"
- name: Cache Maven packages
uses: actions/cache@v5
with:
path: |
~/.m2
~/repository
key: ${{ github.job }}-${{ hashFiles('**/pom.xml') }}
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
- name: Run workflow
uses: ./.github/composite/build-image
with:
ENVIRONMENT: staging
DOCKER_UPLOAD: "false"
testBuildStandupBotImage:
name: Build Test Docker Image for codebloom-standup-bot
runs-on: ubuntu-latest
if: github.ref_name != 'main'
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Run workflow
uses: ./.github/composite/build-image/internal/standup-bot
with:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
DOCKER_UPLOAD: false
validateDBSchema:
name: Validate DB Schema on Prod DB
runs-on: ubuntu-latest
needs: backendPreTest
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Run workflow
uses: ./.github/composite/validate-db
with:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
buildImage:
name: Build Docker Image & Upload to Registry
runs-on: ubuntu-latest
needs: [validateDBSchema, backendTests, frontendTests]
if: github.ref_name == 'main'
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Run workflow
uses: ./.github/composite/build-image
with:
environment: production
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
# buildStandupBotImage:
# name: Build codebloom-standup-bot Docker Image & Upload to Registry
# runs-on: ubuntu-latest
# if: github.ref_name == 'main'
# steps:
# - name: Checkout repository
# uses: actions/checkout@v6
# - name: Run workflow
# uses: ./.github/composite/build-image/internal/standup-bot
# with:
# GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
# GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
redeploy:
name: Redeploy on DigitalOcean
runs-on: ubuntu-latest
needs: buildImage
environment: production
if: github.ref_name == 'main'
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Run workflow
uses: ./.github/composite/redeploy
with:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
# redeployStandupBot:
# name: Redeploy codebloom-standup-bot on Coolify
# runs-on: ubuntu-latest
# needs: buildStandupBotImage
# environment: production
# if: github.ref_name == 'main'
# steps:
# - name: Checkout Repository
# uses: actions/checkout@v6
# - name: Run workflow
# uses: ./.github/composite/redeploy/internal/standup-bot
# with:
# GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
# GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}