check for profile that supports JES #1216
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: Zowe CICS Main CI | |
on: | |
push: | |
paths: | |
- .github/** | |
- packages/** | |
- .npmrc | |
- package.json | |
pull_request: | |
paths: | |
- packages/** | |
workflow_dispatch: | |
jobs: | |
test: | |
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) && !contains(github.event.head_commit.message, '[ci skip]') | |
runs-on: ${{ matrix.os }} | |
outputs: | |
npm-resolutions: ${{ steps.npm-update.outputs.result }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [18.x, 20.x, 22.x] | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
env: | |
OS: ${{ matrix.os }} | |
NODE: ${{ matrix.node-version }} | |
NODE_OPTIONS: --max_old_space_size=4096 | |
timeout-minutes: 60 | |
concurrency: | |
group: ${{ matrix.os }}-node-${{ matrix.node-version }}-ci-${{ github.ref }} | |
cancel-in-progress: true | |
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 }} | |
- name: Disable Lint Annotations | |
run: | | |
echo "::remove-matcher owner=eslint-compact::" | |
echo "::remove-matcher owner=eslint-stylish::" | |
- name: Install Dependencies | |
run: npm ci | |
- name: Update Dependencies | |
id: npm-update | |
uses: zowe-actions/octorelease/script@v1 | |
with: | |
config-dir: .github | |
script: npmUpdate | |
- name: Build Source | |
id: build | |
run: npm run build | |
- name: Unit Tests | |
if: ${{ always() && steps.build.outcome == 'success' }} | |
run: npm run test:unit | |
- name: Archive Results | |
if: ${{ always() && steps.build.outcome == 'success' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }}-${{ matrix.node-version }}-results | |
path: packages/*/__tests__/__results__/ | |
- name: Upload Results to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
env_vars: OS,NODE | |
token: ${{ secrets.CODECOV_TOKEN }} | |
# - name: Bundle all packages | |
# if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x' | |
# run: npm i -g vsce && npm run package | |
# - name: Archive all packages | |
# if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x' | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: zowe-cics-client | |
# path: dist/* | |
e2e-test: | |
runs-on: ubuntu-latest | |
services: | |
wiremock: | |
image: wiremock/wiremock | |
ports: | |
- 8080:8080 | |
volumes: | |
- ${{ github.workspace }}/packages/vsce/__tests__/__e2e__/resources/wiremock:/home/wiremock | |
options: --name wiremock | |
steps: | |
- name: Change workspace folder so wiremock service can write | |
run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Restart Wiremock with new mappings | |
run: docker restart wiremock | |
- name: Use Node.js 22.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build Source | |
id: build | |
run: npm run build | |
- name: List Wiremock mappings | |
if: ${{ always() && steps.build.outcome == 'success' }} | |
run: curl localhost:8080/__admin/mappings | |
- name: Test Wiremock route | |
if: ${{ always() && steps.build.outcome == 'success' }} | |
run: curl localhost:8080/CICSSystemManagement/CICSResultCache/E06EB1264D925C60 | |
- name: E2E Tests | |
if: ${{ always() && steps.build.outcome == 'success' }} | |
uses: coactions/setup-xvfb@v1 | |
with: | |
run: npm run test:e2e | |
release: | |
if: github.event_name == 'push' && github.ref_protected | |
needs: | |
- test | |
- e2e-test | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
ref: ${{ github.ref }} | |
- name: Use Node.js LTS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Install Dependencies | |
run: npm ci | |
- name: Update Dependencies | |
uses: zowe-actions/octorelease/script@v1 | |
env: | |
GIT_COMMITTER_NAME: zowe_robot | |
GIT_COMMITTER_EMAIL: [email protected] | |
NPM_RESOLUTIONS: ${{ needs.test.outputs.npm-resolutions }} | |
with: | |
config-dir: .github | |
script: npmUpdate | |
- name: Build Source | |
run: npm run build | |
- uses: zowe-actions/octorelease@v1 | |
env: | |
GIT_COMMITTER_NAME: ${{ secrets.ZOWE_ROBOT_USER }} | |
GIT_COMMITTER_EMAIL: ${{ secrets.ZOWE_ROBOT_EMAIL }} | |
GIT_CREDENTIALS: x-access-token:${{ secrets.ZOWE_ROBOT_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | |
NPM_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} | |
NPM_EMAIL: ${{ secrets.ZOWE_ROBOT_EMAIL }} | |
NPM_TOKEN: ${{ secrets.VSCODE_NPM_PUBLISHER_TOKEN }} | |
OVSX_PAT: ${{ secrets.VSCODE_OVSX_PUBLISHER_TOKEN }} | |
VSCE_PAT: ${{ secrets.VSCODE_VSCE_PUBLISHER_TOKEN }} | |
with: | |
config-dir: .github |