Update packages #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: 'build-test' | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
environment: Automation_BuildTest | |
runs-on: windows-latest # The type of runner that the job will run on | |
steps: | |
- name: Checkout from PR branch | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
name: Install NPM 20 | |
with: | |
node-version: 20 | |
- name: Installing dependencies | |
run: npm ci | |
- name: Build GitHub Acton | |
run: npm run build | |
- name: Compare the expected and actual dist/ directories | |
shell: cmd | |
run: | | |
FOR /F "tokens=*" %%C IN ('git diff --ignore-space-at-eol dist/ ^| find /c /v ""') DO set COUNTLINE=%%C | |
echo "%COUNTLINE%" | |
if %COUNTLINE% EQU 0 ( | |
echo "Build in dist as expected" | |
) else ( | |
echo "Detected uncommitted changes after build. See status below:" | |
git diff | |
exit 1 | |
) | |
- name: Run Unit and Functional Tests | |
run: npm run test | |