Test Scripts #2210
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: Test Scripts | |
on: | |
pull_request: | |
paths: "scripts/**" | |
push: | |
paths: "scripts/**" | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) && !contains(github.event.head_commit.message, '[ci skip]') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node.js LTS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Setup .npmrc | |
id: setup-npmrc | |
run: npm config set @zowe:registry=https://zowe.jfrog.io/zowe/api/npm/npm-local-release/ | |
- name: Install Node Package Dependencies | |
id: install-node | |
run: | | |
npm i --prod | |
npm install -g puppeteer-cli | |
- name: Set Up Zowe | |
id: setup-zowe | |
run: | | |
npm install -g @zowe/cli@zowe-v2-lts | |
zowe plugins install @zowe/cics-for-zowe-cli@zowe-v2-lts | |
zowe plugins install @zowe/db2-for-zowe-cli@zowe-v2-lts | |
zowe plugins install @zowe/ims-for-zowe-cli@zowe-v2-lts | |
zowe plugins install @zowe/mq-for-zowe-cli@zowe-v2-lts | |
zowe plugins install @zowe/zos-ftp-for-zowe-cli@zowe-v2-lts | |
- name: Get Zowe version | |
id: get-version | |
run: | | |
echo "number=$(echo 'CLI_v'$(npx zowe --version))" >> $GITHUB_OUTPUT | |
- name: Setup zowe.json file | |
id: setup | |
run: | | |
jq '.commandGroups=["cics","db2","ims","mq","zos-ftp"]' zowe.template.json > zowe.json | |
echo "$(jq '.profiles=["cics", "db2","ims","mq","zftp"]' zowe.json)" > zowe.json | |
npm run contribute | |
- name: Teardown Zowe Plugins | |
id: teardown-zowe | |
run: | | |
zowe plugins uninstall @zowe/cics-for-zowe-cli | |
zowe plugins uninstall @zowe/db2-for-zowe-cli | |
zowe plugins uninstall @zowe/ims-for-zowe-cli | |
zowe plugins uninstall @zowe/mq-for-zowe-cli | |
zowe plugins uninstall @zowe/zos-ftp-for-zowe-cli | |
- name: Build Web Help | |
id: build | |
run: | | |
which zowe || true | |
zowe --version || true | |
npm run build:local -- ${{ steps.get-version.outputs.number }} | |
export margin="0.4in" | |
puppeteer print ./generatedWebHelp/docs/all.html ./zowe.pdf --margin-top $margin --margin-right $margin --margin-bottom $margin --margin-left $margin --no-sandbox | |
- name: Archive Results | |
id: upload | |
if: ${{ always() && steps.build.outcome == 'success' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: results | |
path: | | |
generatedWebHelp/ | |
zowe.pdf |