Update eslint.config.js #87
This file contains hidden or 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: Client Side Tools and Coverage | |
| on: | |
| push: | |
| branches: [ '*' ] | |
| pull_request: | |
| branches: [ '*' ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: '18' # Choose your Node.js version | |
| - name: Run Codacy Analysis CLI with Docker (optional) | |
| run: | | |
| export CODACY_CODE=$GITHUB_WORKSPACE | |
| docker run \ | |
| --rm=true \ | |
| --env CODACY_CODE="$CODACY_CODE" \ | |
| --volume /var/run/docker.sock:/var/run/docker.sock \ | |
| --volume "$CODACY_CODE":"$CODACY_CODE" \ | |
| --volume /tmp:/tmp \ | |
| codacy/codacy-analysis-cli \ | |
| analyze --tool eslint --upload --project-token ${{ secrets.CODACY_PROJECT_TOKEN }} --max-allowed-issues 99999 --commit-uuid $GITHUB_SHA | |
| - name: Install dependencies | |
| run: | | |
| npm install -g nyc # Install Istanbul (nyc) for code coverage | |
| npm install # Install project dependencies | |
| npm install --save-dev nyc | |
| npm install --save-dev chai | |
| npm install --save-dev blanket | |
| npm install --save-dev mocha | |
| npm install --save-dev mocha-lcov-reporter | |
| - name: Run tests and collect coverage | |
| run: | | |
| # Replace with the actual command to run your tests | |
| npm test | |
| continue-on-error: true | |
| - name: Upload coverage report to Codacy | |
| env: | |
| CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
| run: | | |
| bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r $GITHUB_WORKSPACE/lcov.info | |
| continue-on-error: true |