Skip to content

Commit

Permalink
Update on_commit_build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-flynn committed Aug 21, 2024
1 parent b6ddbe9 commit b1f8a6e
Showing 1 changed file with 122 additions and 115 deletions.
237 changes: 122 additions & 115 deletions .github/workflows/on_commit_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Test building EMS

on:
push:
branches:
branches:
- "*"
workflow_dispatch:

Expand All @@ -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
- 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

0 comments on commit b1f8a6e

Please sign in to comment.