Skip to content

chore: bootstrap releases for path: . #3037

chore: bootstrap releases for path: .

chore: bootstrap releases for path: . #3037

Workflow file for this run

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
# Tests are executed and coverage reports are emitted as to the action summary
# A dependent workflow which uses workflow_run as a trigger reads the archived outputs and emits comments to the PR triggering this build
name: Build pr
on:
pull_request:
branches: [main, release/**, next/**]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node Modules
id: cache-node-modules
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
- run: npm install -g yarn lerna
- name: Install node_modules
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn
- run: node scripts/setVersion.js --next
- run: yarn build
- run: yarn lint
- run: yarn test
- name: Archive test results
uses: actions/upload-artifact@v2 # upload test results
if: always() # run this step even if previous step failed
with:
name: test-results
path: testResults/junit.xml
- name: Archive coverage report
uses: actions/upload-artifact@v2 # upload coverage report
if: always() # run this step even if previous step failed
with:
name: coverage
path: coverage/cobertura-coverage.xml
- name: Code Coverage Summary Report
uses: irongut/[email protected]
with:
filename: coverage/cobertura-coverage.xml
badge: true
format: 'markdown'
output: 'both'
- name: Write to Job Summary
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
# The check-build-matrix returns success if all matrix jobs in build are successful; otherwise, it returns a failure.
# Use this as a PR status check for GitHub Policy Service instead of individual matrix entry checks.
check-build-matrix:
runs-on: ubuntu-latest
needs: build
if: always()
steps:
- name: All build matrix options are successful
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: One or more build matrix options failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1