From 478c12e9c3b7be644a629eb17a736506add0b9a0 Mon Sep 17 00:00:00 2001 From: Gregory Campbell Date: Sun, 14 Jun 2026 12:49:12 -0400 Subject: [PATCH] Moved all checks into the same workflow for ease of deploying --- .github/workflows/frontend-deploy.yml | 51 ---------- .github/workflows/full-test-and-deploy.yml | 101 +++++++++++++++++++ .github/workflows/go-function-deploy.yml | 29 ------ .github/workflows/python-function-deploy.yml | 29 ------ .github/workflows/rust-function-deploy.yml | 27 ----- .github/workflows/test-pipeline-deploy.yml | 3 - 6 files changed, 101 insertions(+), 139 deletions(-) delete mode 100644 .github/workflows/frontend-deploy.yml create mode 100644 .github/workflows/full-test-and-deploy.yml delete mode 100644 .github/workflows/go-function-deploy.yml delete mode 100644 .github/workflows/python-function-deploy.yml delete mode 100644 .github/workflows/rust-function-deploy.yml diff --git a/.github/workflows/frontend-deploy.yml b/.github/workflows/frontend-deploy.yml deleted file mode 100644 index 27c78c61a..000000000 --- a/.github/workflows/frontend-deploy.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Frontend Deploy - -on: - push: - branches: [master] - paths: - - 'src/**' - - '.github/workflows/frontend-deploy.yml' - - 'package*.json' - - 'package-lock.json' - workflow_dispatch: - -jobs: - test: - runs-on: ubuntu-latest - defaults: - run: - working-directory: . - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - cache: 'npm' - cache-dependency-path: package-lock.json - - - name: Install dependencies - run: npm ci - - - name: Run Linter - run: npm run lint --if-present - - - name: Run Tests - run: npm test -- --watchAll=false - - # Deployment (Waits for manual approval after 'test' passes) - deploy: - runs-on: ubuntu-latest - needs: test - environment: production - - steps: - - name: Trigger webhook using curl - env: - WEBHOOK_URL: ${{ secrets.AMPLIFY_WEBHOOK_URL }} - run: | - curl -i --fail -X POST -H "Content-Type: application/json" -d '{}' "$WEBHOOK_URL" diff --git a/.github/workflows/full-test-and-deploy.yml b/.github/workflows/full-test-and-deploy.yml new file mode 100644 index 000000000..5353f1eff --- /dev/null +++ b/.github/workflows/full-test-and-deploy.yml @@ -0,0 +1,101 @@ +name: Full Test and Deploy + +on: + push: + branches: [master] + workflow_dispatch: + +jobs: + frontend-test: + runs-on: ubuntu-latest + defaults: + run: + working-directory: . + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + cache-dependency-path: package-lock.json + + - name: Install dependencies + run: npm ci + + - name: Run Linter + run: npm run lint --if-present + + - name: Run Tests + run: npm test -- --watchAll=false + + go-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: '1.22' + + - name: Build Go service + working-directory: functions/go/api-handler + run: go build ./cmd/api + + - name: Deploy placeholder + run: echo "Deploy the Go function to AWS Lambda from this step." + + rust-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + + - name: Build Rust service + working-directory: functions/rust/performance-handler + run: cargo build --release + + - name: Deploy placeholder + run: echo "Deploy the Rust function to AWS Lambda from this step." + + python-test: + runs-on: ubuntu-latest + + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install dependencies + working-directory: functions/python/data-processor + run: pip3 install -r requirements.txt + + - name: Deploy placeholder + run: echo "Deploy the Python function to AWS Lambda with Mangum from this step." + + # Deployment (Waits for manual approval after all test jobs pass) + deploy: + runs-on: ubuntu-latest + needs: [frontend-test, go-test, rust-test, python-test] + environment: production + + steps: + - name: Trigger webhook using curl + env: + WEBHOOK_URL: ${{ secrets.AMPLIFY_WEBHOOK_URL }} + run: | + curl -i --fail -X POST -H "Content-Type: application/json" -d '{}' "$WEBHOOK_URL" diff --git a/.github/workflows/go-function-deploy.yml b/.github/workflows/go-function-deploy.yml deleted file mode 100644 index 036de3b58..000000000 --- a/.github/workflows/go-function-deploy.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Go Function Deploy - -on: - push: - branches: [master] - paths: - - 'functions/go/**' - - '.github/workflows/go-function-deploy.yml' - workflow_dispatch: - -jobs: - build-and-deploy: - runs-on: ubuntu-latest - - steps: - - name: Checkout source - uses: actions/checkout@v4 - - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version: '1.22' - - - name: Build Go service - working-directory: functions/go - run: go build ./cmd/api - - - name: Deploy placeholder - run: echo "Deploy the Go function to AWS Lambda from this step." diff --git a/.github/workflows/python-function-deploy.yml b/.github/workflows/python-function-deploy.yml deleted file mode 100644 index 9e2eb99b4..000000000 --- a/.github/workflows/python-function-deploy.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Python Function Deploy - -on: - push: - branches: [master] - paths: - - 'functions/python/**' - - '.github/workflows/python-function-deploy.yml' - workflow_dispatch: - -jobs: - build-and-deploy: - runs-on: ubuntu-latest - - steps: - - name: Checkout source - uses: actions/checkout@v4 - - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Install dependencies - working-directory: functions/python - run: pip3 install -r requirements.txt - - - name: Deploy placeholder - run: echo "Deploy the Python function to AWS Lambda with Mangum from this step." diff --git a/.github/workflows/rust-function-deploy.yml b/.github/workflows/rust-function-deploy.yml deleted file mode 100644 index 6fa6a8ba0..000000000 --- a/.github/workflows/rust-function-deploy.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Rust Backend Deploy - -on: - push: - branches: [master] - paths: - - 'functions/rust/**' - - '.github/workflows/rust-backend-deploy.yml' - workflow_dispatch: - -jobs: - build-and-deploy: - runs-on: ubuntu-latest - - steps: - - name: Checkout source - uses: actions/checkout@v4 - - - name: Setup Rust - uses: dtolnay/rust-toolchain@stable - - - name: Build Rust service - working-directory: functions/rust - run: cargo build --release - - - name: Deploy placeholder - run: echo "Deploy the Rust binary or container from this step." diff --git a/.github/workflows/test-pipeline-deploy.yml b/.github/workflows/test-pipeline-deploy.yml index 184be6876..25e4b4393 100644 --- a/.github/workflows/test-pipeline-deploy.yml +++ b/.github/workflows/test-pipeline-deploy.yml @@ -3,9 +3,6 @@ name: Test Pipeline Deploy on: push: branches: [master] - paths: - - 'tests/**' - - '.github/workflows/test-pipeline-deploy.yml' workflow_dispatch: jobs: