Send CLI output to stdout and test sample project in PR workflow
#110
Workflow file for this run
This file contains hidden or 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: Build Extension & CLI | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| jobs: | |
| extension: | |
| name: Build Extension | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install Dependencies | |
| run: | | |
| npm install | |
| cd cli | |
| npm install | |
| cd .. | |
| - name: Build Extension | |
| run: vsce package | |
| - name: Upload VSIX | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: vscode-ibmi-testing-pr-build | |
| path: ./*.vsix | |
| if-no-files-found: error | |
| cli: | |
| name: Build CLI | |
| runs-on: ubuntu-latest | |
| environment: COMMON1 | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install CLI Dependencies | |
| working-directory: cli | |
| run: | | |
| npm run install:api | |
| npm install | |
| - name: Build CLI | |
| working-directory: cli | |
| run: | | |
| npm run webpack | |
| npm publish --dry-run | |
| - name: Install CLI Tools | |
| run: | | |
| npm i -g @ibm/ibmi-ci | |
| npm i -g @ibm/itest | |
| - name: Build Sample Project | |
| working-directory: examples/ibmi-company_system | |
| run: | | |
| ici \ | |
| --cmd "mkdir -p './builds/itest_${GITHUB_HEAD_REF}'" \ | |
| --rcwd "./builds/itest_${GITHUB_HEAD_REF}" \ | |
| --push "." \ | |
| --ignore --cl "CRTLIB ITESTCSYS" \ | |
| --ignore --cl "CLRLIB ITESTCSYS" \ | |
| --cmd "/QOpenSys/pkgs/bin/gmake BIN_LIB=ITESTCSYS" | |
| env: | |
| IBMI_HOST: ${{ secrets.IBMI_HOST }} | |
| IBMI_USER: ${{ secrets.IBMI_USER }} | |
| IBMI_PASSWORD: ${{ secrets.IBMI_PASSWORD }} | |
| IBMI_SSH_PORT: ${{ secrets.IBMI_SSH_PORT }} | |
| - name: Test CLI | |
| working-directory: cli | |
| run: | | |
| ./dist/index.js \ | |
| --ld ../examples/ibmi-company_system | |
| --id /home/SANJULA/builds/ibmi-company_system \ | |
| --ll ITESTCSYS RPGUNIT QDEVTOOLS \ | |
| --cl ITESTCSYS \ | |
| --cc --sr --tr --to --co |