Skip to content

Improve setup

Improve setup #6

name: Backend Build Check
on:
push:
branches:
- main
paths:
- 'services/**' # Only trigger on changes within this folder
- '.github/**'
pull_request:
paths:
- 'services/**' # Only trigger on changes within this folder
- '.github/**'
workflow_dispatch:
jobs:
backend-build-check:
name: Backend Build Check
runs-on: ubuntu-latest
# Cache dependencies to speed up the workflow
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install Yarn
run: npm install --global yarn
- name: Install dependencies, run tests, lint, and build for multiple folders
run: |
folders=("services/file-retriever" "services/object-mapping-indexer") # Add your folders here
yarn install
yarn lint
for folder in "${folders[@]}"; do
echo "Processing $folder"
cd $folder
yarn install
yarn test
yarn build
cd -
done