This repository has been archived by the owner on Nov 25, 2024. It is now read-only.
Add workflow to update issue and PR status on GH project board #120
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: zowe-cli-plugin | |
on: [push, pull_request, 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]') | |
outputs: | |
npm-resolutions: ${{ steps.npm-update.outputs.result }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [18.x, 20.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@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install Node Package Dependencies | |
run: npm ci | |
- name: Update Dependencies | |
id: npm-update | |
uses: zowe-actions/octorelease/script@v1 | |
with: | |
script: npmUpdate | |
- name: Build Source | |
id: build | |
run: npm run build --if-present | |
- name: Unit Tests | |
if: ${{ always() && steps.build.outcome == 'success' }} | |
run: npm run test:unit | |
- name: Unlock Keyring | |
if: ${{ always() && steps.build.outcome == 'success' && matrix.os == 'ubuntu-latest' }} | |
uses: t1m0thyj/unlock-keyring@v1 | |
- name: Create System Test Properties | |
if: ${{ always() && steps.build.outcome == 'success' }} | |
run: > | |
echo "zosmf: | |
user: ibmuser | |
pass: plaintext | |
host: localhost | |
port: 12345 | |
" > __tests__/__resources__/properties/custom_properties.yaml | |
- name: System Tests | |
if: ${{ always() && steps.build.outcome == 'success' }} | |
run: npm run test:system | |
- name: Archive Results | |
if: ${{ always() && steps.build.outcome == 'success' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.os }}-${{ matrix.node-version }}-results | |
path: | | |
__tests__/__results__/ | |
- name: Upload Results to Codecov | |
if: ${{ always() && steps.build.outcome == 'success' }} | |
uses: codecov/codecov-action@v3 | |
with: | |
env_vars: OS,NODE | |
release: | |
if: github.event_name == 'push' && github.ref_protected | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
ref: ${{ github.ref }} | |
- name: Use Node.js LTS | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 'lts/*' | |
- name: Install Dependencies | |
run: npm ci | |
- name: Update Dependencies | |
uses: zowe-actions/octorelease/script@v1 | |
env: | |
GIT_COMMITTER_NAME: ${{ secrets.ZOWE_ROBOT_USER }} | |
GIT_COMMITTER_EMAIL: ${{ secrets.ZOWE_ROBOT_EMAIL }} | |
NPM_RESOLUTIONS: ${{ needs.test.outputs.npm-resolutions }} | |
with: | |
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 }} |