feat: merge filters and indexes #185
Workflow file for this run
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: Tests | |
on: pull_request | |
jobs: | |
run-tests: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'npm' | |
- name: Install Dependencies | |
run: npm ci | |
- name: Run Tests | |
run: npm run test | |
- name: Run Lint Checks | |
run: | | |
npm run check:lint | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
directory: ./reports/coverage | |
- name: Update sonar-project.properties | |
run: | | |
# Retrieve the version from package.json | |
version=$(node -e "console.log(require('./package.json').version)") | |
# Update the sonar-project.properties file with the version | |
sed -i "s/sonar.projectVersion=.*$/sonar.projectVersion=$version/" sonar-project.properties | |
- name: Fix filesystem paths in generated reports | |
if: always() | |
run: | | |
sed -i 's+home/runner/work/rudder-json-template-engine/rudder-json-template-engine+/github/workspace+g' reports/coverage/lcov.info | |
sed -i 's+/home/runner/work/rudder-json-template-engine/rudder-json-template-engine+/github/workspace+g' reports/eslint.json | |
- name: SonarCloud Scan | |
if: always() | |
uses: SonarSource/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.PAT }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |