Skip to content

Commit

Permalink
Add packages for tests
Browse files Browse the repository at this point in the history
Add tests for pluralise

Add tests for addLeadingZeros

Add tests for casting

Add tests for formatting the dates

Add test for number to currency

Add the workflow for running the tests
  • Loading branch information
tim-s-ccs committed Feb 2, 2022
1 parent 9f683ee commit a0f805b
Show file tree
Hide file tree
Showing 11 changed files with 1,649 additions and 12 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Tests

on: [push, pull_request]

jobs:
run-tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Read node version from .nvmrc
id: nvm
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"

- name: Setup node
uses: actions/setup-node@v1
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test
2 changes: 2 additions & 0 deletions bin/build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ fi
echo "Starting to build release..."
echo " "
echo "This will:"
echo "- run the test suite"
echo "- build CCS Frontend into the 'dist/' directory"
echo "- commit all changes and push the branch to remote"
echo " "
Expand All @@ -24,6 +25,7 @@ if [[ $continue_prompt != 'y' ]]; then
exit 0
fi

npm run test
npm run build

ALL_PACKAGE_VERSION=$(node -p "require('./package.json').version")
Expand Down
Loading

0 comments on commit a0f805b

Please sign in to comment.