From b1f8a6e112e965193301ab58926ed81661df09e9 Mon Sep 17 00:00:00 2001 From: Kyle Flynn Date: Wed, 21 Aug 2024 16:40:14 -0400 Subject: [PATCH] Update on_commit_build.yml --- .github/workflows/on_commit_build.yml | 237 +++++++++++++------------- 1 file changed, 122 insertions(+), 115 deletions(-) diff --git a/.github/workflows/on_commit_build.yml b/.github/workflows/on_commit_build.yml index 4393f9d2..5f0b1236 100644 --- a/.github/workflows/on_commit_build.yml +++ b/.github/workflows/on_commit_build.yml @@ -2,7 +2,7 @@ name: Test building EMS on: push: - branches: + branches: - "*" workflow_dispatch: @@ -12,129 +12,136 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: Detect changes - id: changed - uses: tj-actions/changed-files@v34 - with: - files: | - front-end/** - lib/** - - - name: Use Node.js 18.x - if: steps.changed.outputs.any_changed == 'true' - uses: actions/setup-node@v3 - with: - node-version: 18.x - - - name: Install lib dependencies - if: steps.changed.outputs.any_changed == 'true' - run: | - npm run install:lib - - - name: Build libs - if: steps.changed.outputs.any_changed == 'true' - run: | - npm run build:lib - - - name: Install frontend dependencies - if: steps.changed.outputs.any_changed == 'true' - run: | - npm run install:frontend - - - name: Build frontend - if: steps.changed.outputs.any_changed == 'true' - run: | - npm run build:frontend + - name: Cleanup workspace + run: | + ls -la ./ + rm -rf ./* || true + rm -rf ./.??* || true + ls -la ./ + + - uses: actions/checkout@v3 + with: + fetch-depth: 2 + + - name: Detect changes + id: changed + uses: tj-actions/changed-files@v34 + with: + files: | + front-end/** + lib/** + + - name: Use Node.js 18.x + if: steps.changed.outputs.any_changed == 'true' + uses: actions/setup-node@v3 + with: + node-version: 18.x + + - name: Install lib dependencies + if: steps.changed.outputs.any_changed == 'true' + run: | + npm run install:lib + + - name: Build libs + if: steps.changed.outputs.any_changed == 'true' + run: | + npm run build:lib + + - name: Install frontend dependencies + if: steps.changed.outputs.any_changed == 'true' + run: | + npm run install:frontend + + - name: Build frontend + if: steps.changed.outputs.any_changed == 'true' + run: | + npm run build:frontend build-backend: name: Build Backend runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: Detect changes - id: changed - uses: tj-actions/changed-files@v34 - with: - files: | - back-end/api/** - bacl-end/realtime/** - lib/** - - - name: Use Node.js 18.x - if: steps.changed.outputs.any_changed == 'true' - uses: actions/setup-node@v3 - with: - node-version: 18.x - - - name: Install lib dependencies - if: steps.changed.outputs.any_changed == 'true' - run: | - npm run install:lib - - - name: Build libs - if: steps.changed.outputs.any_changed == 'true' - run: | - npm run build:lib - - - name: Install backend dependencies - if: steps.changed.outputs.any_changed == 'true' - run: | - npm run install:backend - - - name: Build backend - if: steps.changed.outputs.any_changed == 'true' - run: | - npm run build:backend + - uses: actions/checkout@v3 + with: + fetch-depth: 2 + + - name: Detect changes + id: changed + uses: tj-actions/changed-files@v34 + with: + files: | + back-end/api/** + bacl-end/realtime/** + lib/** + + - name: Use Node.js 18.x + if: steps.changed.outputs.any_changed == 'true' + uses: actions/setup-node@v3 + with: + node-version: 18.x + + - name: Install lib dependencies + if: steps.changed.outputs.any_changed == 'true' + run: | + npm run install:lib + + - name: Build libs + if: steps.changed.outputs.any_changed == 'true' + run: | + npm run build:lib + + - name: Install backend dependencies + if: steps.changed.outputs.any_changed == 'true' + run: | + npm run install:backend + + - name: Build backend + if: steps.changed.outputs.any_changed == 'true' + run: | + npm run build:backend build-frc-fms: name: Build FRC FMS runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: Detect changes - id: changed - uses: tj-actions/changed-files@v34 - with: - files: | - back-end/frc-fms/** - lib/** - - - name: Use Node.js 18.x - if: steps.changed.outputs.any_changed == 'true' - uses: actions/setup-node@v3 - with: - node-version: 18.x - - - name: Install lib dependencies - if: steps.changed.outputs.any_changed == 'true' - run: | - npm run install:lib - - - name: Build libs - if: steps.changed.outputs.any_changed == 'true' - run: | - npm run build:lib - - - name: Install backend dependencies - if: steps.changed.outputs.any_changed == 'true' - run: | - cd back-end/frc-fms - npm i - - - name: Build backend - if: steps.changed.outputs.any_changed == 'true' - run: | - cd back-end/frc-fms - npm run build \ No newline at end of file + - uses: actions/checkout@v3 + with: + fetch-depth: 2 + + - name: Detect changes + id: changed + uses: tj-actions/changed-files@v34 + with: + files: | + back-end/frc-fms/** + lib/** + + - name: Use Node.js 18.x + if: steps.changed.outputs.any_changed == 'true' + uses: actions/setup-node@v3 + with: + node-version: 18.x + + - name: Install lib dependencies + if: steps.changed.outputs.any_changed == 'true' + run: | + npm run install:lib + + - name: Build libs + if: steps.changed.outputs.any_changed == 'true' + run: | + npm run build:lib + + - name: Install backend dependencies + if: steps.changed.outputs.any_changed == 'true' + run: | + cd back-end/frc-fms + npm i + + - name: Build backend + if: steps.changed.outputs.any_changed == 'true' + run: | + cd back-end/frc-fms + npm run build