Updating VIB GitHub Action to Node.js 20 #796
Workflow file for this run
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
name: Validate | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
types: | |
- assigned | |
- opened | |
- synchronize | |
- reopened | |
env: | |
CSP_API_URL: https://console.cloud.vmware.com | |
CSP_API_TOKEN: ${{ secrets.CSP_API_TOKEN }} | |
VIB_PUBLIC_URL: https://cp.bromelia.vmware.com | |
jobs: | |
build: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set Node.js 20 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 20.x | |
- name: Install dependencies | |
run: npm ci | |
- name: Compile | |
run: npm run build | |
- name: Lint | |
run: npm run lint | |
- name: Package | |
run: npm run package | |
- name: Compare the expected and actual dist/ directories | |
run: | | |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then | |
echo "Detected $(git diff --ignore-space-at-eol dist/ | wc -l) uncommitted changes after build." | |
exit 1 | |
fi | |
id: diff | |
- name: Functional Tests | |
run: npm test |