Skip to content

[MOO-1562] Add widget, NT branch and SP version selection when triggering #664

[MOO-1562] Add widget, NT branch and SP version selection when triggering

[MOO-1562] Add widget, NT branch and SP version selection when triggering #664

Workflow file for this run

name: Run build
on:
push:
branches:
- main
- 'mx/release/**'
pull_request:
branches:
- main
- 'mx/release/**'
jobs:
test:
name: "Build (${{ matrix.os }})"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- name: "Checking changed files"
id: files
uses: softprops/diffset@db8c4e13f5cc3f8ab666ba2cb6998b688058a41c # v1
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
with:
base: main
global_files: |
!{packages/**/*,configs/e2e/*.json,scripts/**/*,data/**/*}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Checking-out code"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
- name: "Fetching main to compare"
if: github.event_name == 'pull_request' && steps.files.outputs.global_files == ''
run: git fetch --no-tags --prune --depth=1 origin +refs/heads/${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }}
- name: "Defining environment variables"
if: startsWith(matrix.os, 'ubuntu')
id: variablesLinux
run: echo "arg=$(if [ "${{ steps.files.outputs.global_files }}" = "" ] && ${{ github.event_name == 'pull_request' }}; then echo '--since'; else echo '--all'; fi)" >> ${{ runner.os == 'Windows' && '$env:GITHUB_OUTPUT' || '$GITHUB_OUTPUT' }}
- name: "Defining environment variables"
if: startsWith(matrix.os, 'windows')
id: variablesWindows
run: echo "arg=$(If ('${{ steps.files.outputs.global_files }}' -eq '' -AND '${{ github.event_name == 'pull_request' }}' -eq 'true'){ echo '--since' } Else { echo '--all' })" >> ${{ runner.os == 'Windows' && '$env:GITHUB_OUTPUT' || '$GITHUB_OUTPUT' }}
- name: "Defining node version"
uses: actions/setup-node@d86ebcd40b3cb50b156bfa44dd277faf38282d12 # v4
with:
node-version-file: ".nvmrc"
cache: "yarn"
- name: "Installing dependencies"
run: yarn install
- name: "Running build for development"
run: yarn workspaces foreach ${{ steps.variablesLinux.outputs.arg }} ${{ steps.variablesWindows.outputs.arg }} --parallel run build
env:
NODE_OPTIONS: --max_old_space_size=8192