[Snyk] Security upgrade ws from 7.5.10 to 8.17.1 #108
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-tests | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
pull_request: | |
branches: | |
- "**" | |
push: | |
branches: | |
- "main" | |
workflow_call: | |
jobs: | |
tests: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
node-version: [18] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: pnpm/action-setup@v2 | |
name: Install pnpm | |
with: | |
version: 8 | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Check code style | |
run: pnpm run lint | |
- name: Build packages | |
run: pnpm m run build | |
- name: Run tests | |
run: pnpm m run test | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
files: ./packages/cli-mautic/coverage/coverage-final.json,./packages/cli-zendesk/coverage/coverage-final.json,./packages/components/coverage/coverage-final.json,./packages/listener-match/coverage/coverage-final.json,./packages/webhooks-mautic-zendesk/coverage/coverage-final.json,./packages/listener-solidarity/coverage/coverage-final.json,./packages/webhooks-solidarity-count/coverage/coverage-final.json | |
#directory: ./packages/**/coverage/* | |
flags: unittests | |
verbose: true |