Skip to content

Update dependency mocha to v11 #106

Update dependency mocha to v11

Update dependency mocha to v11 #106

Workflow file for this run

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build_and_test:
runs-on: ubuntu-latest
name: Run unit tests
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
# Since node_modules needs to be under version control, make sure the
# checked-in dependencies match those described in package.json
- run: git diff --exit-code
- run: npm test
action_outputs:
runs-on: ubuntu-latest
name: Run action and check output
steps:
- uses: actions/checkout@v4
- uses: ./
id: version
- name: Test outputs
run: |
export OUTPUT="${{ steps.version.outputs.version }}"
echo "version: $OUTPUT must match .+-.+-.+"
bash -c '[[ $OUTPUT =~ .+-.+-.+ ]]'
export OUTPUT="${{ steps.version.outputs.version-without-v }}"
echo "version-without-v: $OUTPUT must match .+-.+-.+"
bash -c '[[ $OUTPUT =~ .+-.+-.+ ]]'
export OUTPUT="${{ steps.version.outputs.major }}"
echo "major: $OUTPUT must not be empty"
test -n "$OUTPUT"
export OUTPUT="${{ steps.version.outputs.minor }}"
echo "minor: $OUTPUT must not be empty"
test -n "$OUTPUT"
export OUTPUT="${{ steps.version.outputs.patch }}"
echo "patch: $OUTPUT must not be empty"
test -n "$OUTPUT"