Skip to content

chore(release): pull main into develop post release v3.5.0 (#1682) #101

chore(release): pull main into develop post release v3.5.0 (#1682)

chore(release): pull main into develop post release v3.5.0 (#1682) #101

name: Unit Tests and Lint
on:
workflow_dispatch:
push:
branches: ['main', 'develop']
pull_request:
branches: ['main', 'develop', 'hotfix/*']
types: ['opened', 'reopened', 'synchronize']
env:
NODE_OPTIONS: "--no-warnings"
jobs:
test:
name: Unit Tests and Lint
runs-on: [self-hosted, Linux, X64]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
env:
HUSKY: 0
run: |
npm run setup:ci
- name: Execute unit tests
run: |
npm run test:ci
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./packages/analytics-js/reports/coverage/clover.xml,./packages/analytics-js-common/reports/coverage/clover.xml,./packages/analytics-js-integrations/reports/coverage/clover.xml,./packages/analytics-js-plugins/reports/coverage/clover.xml,./packages/analytics-js-service-worker/reports/coverage/clover.xml,./packages/analytics-v1.1/reports/coverage/clover.xml
- name: Execute linting check
run: |
npm run check:lint:ci
- name: Fix filesystem paths in generated reports
run: |
./scripts/fix-reports-path-in-github-runner.sh
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}