From d3055b1682bc5d3c23490448b01486382b0e2ff8 Mon Sep 17 00:00:00 2001 From: Eric Cornelissen Date: Sat, 8 Jun 2024 12:56:28 +0200 Subject: [PATCH] Stop using Codecov (#1583) Stop using Codecov in an effort to minimize dependencies and secrets used in this project. The integration is largely unused (at least by me) and doesn't even quiet work (coverage for some flags isn't properly tracked, even after resetting data). --- .github/codecov.yml | 84 ---------------------------- .github/labeler.yml | 1 - .github/workflows/checks.yml | 65 --------------------- .github/workflows/config-codecov.yml | 34 ----------- README.md | 3 - 5 files changed, 187 deletions(-) delete mode 100644 .github/codecov.yml delete mode 100644 .github/workflows/config-codecov.yml diff --git a/.github/codecov.yml b/.github/codecov.yml deleted file mode 100644 index 8580424c5..000000000 --- a/.github/codecov.yml +++ /dev/null @@ -1,84 +0,0 @@ -# Check out Codecov at: https://codecov.io/ - -coverage: - precision: 2 - round: down - range: 80...100 - status: - project: - default: - target: 95% - flags: - - e2e-MacOS - - e2e-Ubuntu - - e2e-Windows - - integration-MacOS - - integration-Ubuntu - - integration-Windows - relaxed: - target: 10% - flags: - - breakage - - compatibility - strict: - target: 100% - flags: - - unit - -comment: - layout: diff, flags, files - behavior: default # update, if exists. Otherwise post new. - require_changes: true # only post the comment if coverage changes - require_base: no - require_head: yes - -flags: - breakage: - carryforward: true - paths: - - src/ - compatibility: - carryforward: true - paths: - - src/ - e2e-MacOS: - carryforward: true - paths: - - src/ - ignore: - - src/modules/stateless.js - - src/modules/testing.js - e2e-Ubuntu: - carryforward: true - paths: - - src/ - ignore: - - src/modules/stateless.js - - src/modules/testing.js - e2e-Windows: - carryforward: true - paths: - - src/ - ignore: - - src/modules/stateless.js - - src/modules/testing.js - integration-MacOS: - carryforward: true - paths: - - src/ - integration-Ubuntu: - carryforward: true - paths: - - src/ - integration-Windows: - carryforward: true - paths: - - src/ - unit: - carryforward: true - paths: - - src/internal/ - -ignore: - - script/**/* - - test/**/* diff --git a/.github/labeler.yml b/.github/labeler.yml index bcf9681a6..c836e4f6a 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -4,7 +4,6 @@ ci/cd: - changed-files: - any-glob-to-any-file: - .github/workflows/* - - .github/codecov.yml - .github/dependabot.yml - .github/labeler.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 20ed0d494..9088dc3b8 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -230,18 +230,13 @@ jobs: egress-policy: block allowed-endpoints: > actions-results-receiver-production.githubapp.com:443 - api.codecov.io:443 api.github.com:443 artifactcache.actions.githubusercontent.com:443 - cli.codecov.io:443 - codecov.io:443 github.com:443 gitlab.com:443 nodejs.org:443 objects.githubusercontent.com:443 registry.npmjs.org:443 - storage.googleapis.com:443 - uploader.codecov.io:443 - name: Checkout repository uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Install Node.js @@ -253,14 +248,6 @@ jobs: run: npm clean-install - name: Run breakage tests run: npm run coverage:breakage - - name: Upload coverage to Codecov - uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1 - if: ${{ failure() || success() }} - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - with: - file: ./_reports/coverage/breakage/lcov.info - flags: breakage test-compatibility: name: Compatibility runs-on: ubuntu-22.04 @@ -284,18 +271,13 @@ jobs: egress-policy: block allowed-endpoints: > actions-results-receiver-production.githubapp.com:443 - api.codecov.io:443 api.github.com:443 artifactcache.actions.githubusercontent.com:443 - cli.codecov.io:443 - codecov.io:443 github.com:443 gitlab.com:443 nodejs.org:443 objects.githubusercontent.com:443 registry.npmjs.org:443 - storage.googleapis.com:443 - uploader.codecov.io:443 - name: Checkout repository uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Install Node.js @@ -309,14 +291,6 @@ jobs: run: npm clean-install - name: Run compatibility tests run: npm run coverage:compat - - name: Upload coverage to Codecov - uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1 - if: ${{ matrix.node-version == '22.0.0' }} - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - with: - file: ./_reports/coverage/compat/lcov.info - flags: compatibility test-e2e: name: End-to-end (${{ matrix.name }}) runs-on: ${{ matrix.os }} @@ -340,19 +314,14 @@ jobs: egress-policy: block allowed-endpoints: > actions-results-receiver-production.githubapp.com:443 - api.codecov.io:443 api.github.com:443 artifactcache.actions.githubusercontent.com:443 azure.archive.ubuntu.com:80 - cli.codecov.io:443 - codecov.io:443 github.com:443 gitlab.com:443 nodejs.org:443 objects.githubusercontent.com:443 registry.npmjs.org:443 - storage.googleapis.com:443 - uploader.codecov.io:443 - name: Checkout repository uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Install Node.js @@ -370,14 +339,6 @@ jobs: run: sudo apt-get --assume-yes install zsh - name: Run end-to-end tests run: npm run coverage:e2e - - name: Upload coverage to Codecov - uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1 - if: ${{ failure() || success() }} - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - with: - file: ./_reports/coverage/e2e/lcov.info - flags: e2e-${{ matrix.name }} test-integration: name: Integration (${{ matrix.name }}) runs-on: ${{ matrix.os }} @@ -402,19 +363,14 @@ jobs: egress-policy: block allowed-endpoints: > actions-results-receiver-production.githubapp.com:443 - api.codecov.io:443 api.github.com:443 artifactcache.actions.githubusercontent.com:443 azure.archive.ubuntu.com:80 - cli.codecov.io:443 - codecov.io:443 github.com:443 gitlab.com:443 nodejs.org:443 objects.githubusercontent.com:443 registry.npmjs.org:443 - storage.googleapis.com:443 - uploader.codecov.io:443 - name: Checkout repository uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Install Node.js @@ -432,14 +388,6 @@ jobs: run: sudo apt-get --assume-yes install csh - name: Run integration tests run: npm run coverage:integration - - name: Upload coverage to Codecov - uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1 - if: ${{ failure() || success() }} - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - with: - file: ./_reports/coverage/integration/lcov.info - flags: integration-${{ matrix.name }} test-mutation-unit: name: Mutation (Unit) runs-on: ubuntu-22.04 @@ -548,18 +496,13 @@ jobs: egress-policy: block allowed-endpoints: > actions-results-receiver-production.githubapp.com:443 - api.codecov.io:443 api.github.com:443 artifactcache.actions.githubusercontent.com:443 - cli.codecov.io:443 - codecov.io:443 github.com:443 gitlab.com:443 nodejs.org:443 objects.githubusercontent.com:443 registry.npmjs.org:443 - storage.googleapis.com:443 - uploader.codecov.io:443 - name: Checkout repository uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - name: Install Node.js @@ -571,14 +514,6 @@ jobs: run: npm clean-install - name: Run unit tests run: npm run coverage:unit - - name: Upload coverage to Codecov - uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1 - if: ${{ failure() || success() }} - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - with: - file: ./_reports/coverage/unit/lcov.info - flags: unit transpile: name: Transpile runs-on: ubuntu-22.04 diff --git a/.github/workflows/config-codecov.yml b/.github/workflows/config-codecov.yml deleted file mode 100644 index 66342a36f..000000000 --- a/.github/workflows/config-codecov.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Config Codecov -on: - pull_request: - paths: - - .github/workflows/config-codecov.yml - - .github/codecov.yml - push: - branches: - - main - paths: - - .github/workflows/config-codecov.yml - - .github/codecov.yml - -permissions: read-all - -jobs: - codecov: - name: Codecov - runs-on: ubuntu-22.04 - steps: - - name: Harden runner - uses: step-security/harden-runner@f086349bfa2bd1361f7909c78558e816508cdc10 # v2.8.0 - with: - disable-sudo: true - egress-policy: block - allowed-endpoints: > - actions-results-receiver-production.githubapp.com:443 - api.github.com:443 - codecov.io:443 - github.com:443 - - name: Checkout repository - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - - name: Validate Codecov configuration - uses: ericcornelissen/codecov-config-validator-action@bbb3f8ef45de6f6ce57ea8d566940bdd78b4814a # v1.0.2 diff --git a/README.md b/README.md index 319cc56ef..272cc1c42 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ # Shescape [![GitHub Actions][ci-image]][ci-url] -[![Coverage Report][coverage-image]][coverage-url] [![npm Package][npm-image]][npm-url] A simple shell escape library for JavaScript. Use it to escape user-controlled @@ -93,8 +92,6 @@ file's banner comment. [ci-url]: https://github.com/ericcornelissen/shescape/actions/workflows/checks.yml [ci-image]: https://github.com/ericcornelissen/shescape/actions/workflows/checks.yml/badge.svg -[coverage-url]: https://codecov.io/gh/ericcornelissen/shescape -[coverage-image]: https://codecov.io/gh/ericcornelissen/shescape/branch/main/graph/badge.svg [npm-url]: https://www.npmjs.com/package/shescape [npm-image]: https://img.shields.io/npm/v/shescape.svg [an issue]: https://github.com/ericcornelissen/shescape/issues