Skip to content

Merge pull request #1283 from devonfw/dependabot/npm_and_yarn/node/cl… #305

Merge pull request #1283 from devonfw/dependabot/npm_and_yarn/node/cl…

Merge pull request #1283 from devonfw/dependabot/npm_and_yarn/node/cl… #305

on:
push:
branches: [develop]
name: Build
jobs:
# JOB to run change detection
changes:
runs-on: ubuntu-latest
# Set job outputs to values from filter step
outputs:
Angular: ${{ steps.filter.outputs.Angular }}
Node: ${{ steps.filter.outputs.Node }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
Angular:
- 'angular/**'
Node:
- 'node/**'
# JOB to build Angular code
Angular:
needs: changes
if: ${{ needs.changes.outputs.Angular == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 14
- name: build
run: |
cd angular
npm install
npm run build
cd ..
- name: test
run: |
cd angular
npm install
npm run test:ci
# JOB to build Node code
Node:
needs: changes
if: ${{ needs.changes.outputs.Node == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: build
run: |
cd node
yarn install
yarn build
cd ..
- name: test
run: |
cd node
yarn install
npm test