chore(deps): update dependency typescript to v5 #234
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: Unit Test CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: 'Set Up Node' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache node modules | |
uses: actions/cache@v3 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Install packages | |
run: yarn --frozen-lock-file --prefer-offline | |
- name: Test | |
run: yarn test:ci | |
continue-on-error: true | |
- name: Record code coverage | |
id: record_code_coverage | |
run: | | |
output="$(npx coverage-percentage ./test-coverage/lcov.info --lcov)" | |
output=$(printf '%.f' $output) | |
echo "::set-output name=percentage::$output" | |
echo "Current test coverage is $output%" | |
- name: Check test coverage | |
uses: terencetcf/github-actions-lcov-minimum-coverage-checker@v1 | |
with: | |
coverage-file: test-coverage/lcov.info | |
minimum-coverage: 90 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: test-coverage-report | |
path: test-coverage/* | |
retention-days: 1 |