Skip to content

Release 2.0.0

Release 2.0.0 #1

Workflow file for this run

name: Run Tests on PR to release
on:
pull_request:
branches:
- release
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: "18.x"
- name: Install Dependencies
run: npm ci
- name: Verify Package Version
run: |
tag_version=$(echo "${{ github.ref }}" | sed 's/refs\/tags\///')
package_version=$(node -p "require('./package.json').version")
if [ "$tag_version" != "$package_version" ]; then
echo "Error: package.json version ($package_version) does not match tag version ($tag_version)"
exit 1
fi
- name: Verify Package Lock Version
run: |
tag_version=$(echo "${{ github.ref }}" | sed 's/refs\/tags\///')
lockfile_version=$(node -p "require('./package-lock.json').version")
if [ "$tag_version" != "$lockfile_version" ]; then
echo "Error: package-lock.json version ($lockfile_version) does not match tag version ($tag_version)"
exit 1
fi
- name: Run Tests with Coverage
run: npm run test:coverage
- name: Upload Coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}