mirror of
https://github.com/pnpm/pnpm.git
synced 2026-06-28 09:55:39 -04:00
* refactor(pnpr): rename pnpm-registry to pnpr Rename the registry server across the board to match the npm wrapper package name, which was already `@pnpm/pnpr`. - crate `pnpm-registry` -> `pnpr`, `pnpm-registry-fixtures` -> `pnpr-fixtures` - binaries `pnpm-registry` -> `pnpr`, `pnpm-registry-prepare` -> `pnpr-prepare` - module paths and log targets `pnpm_registry::*` -> `pnpr::*` - binary-locating env vars `PNPM_REGISTRY_BIN` -> `PNPR_BIN`, `PNPM_REGISTRY_PREPARE_BIN` -> `PNPR_PREPARE_BIN` - top-level directory `registry/` -> `pnpr/` (crates, npm wrapper, fixtures) The registry-mock storage concept is intentionally left as-is: `PNPM_REGISTRY_MOCK_PORT`/`PNPM_REGISTRY_MOCK_STORAGE`/`PNPM_REGISTRY_STORAGE`, the `~/.cache/pnpm-registry/storage` path + benchmark cache keys, and the external `pnpm-registry-mock` npm package referenced in test fixtures. * style(pnpr): rustfmt import grouping after rename * ci(pnpr): point typos at pnpr instead of removed registry dir * chore(pnpr): update pre-push path filter from registry to pnpr
113 lines
3.1 KiB
YAML
113 lines
3.1 KiB
YAML
# Run cargo-llvm-cov and upload to codecov.io
|
|
|
|
name: Pacquet Code Coverage
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
types: [opened, synchronize]
|
|
paths:
|
|
- 'pacquet/**/*.rs'
|
|
- 'pnpr/**/*.rs'
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'pacquet/**/*.rs'
|
|
- 'pnpr/**/*.rs'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.ref_name != 'main' }}
|
|
|
|
jobs:
|
|
coverage:
|
|
name: Code Coverage
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
submodules: true # Pull submodules for `cargo coverage`
|
|
persist-credentials: false
|
|
|
|
- name: Install Rust Toolchain
|
|
uses: ./.github/actions/rustup
|
|
|
|
- name: Install cargo-llvm-cov
|
|
uses: taiki-e/install-action@184183c2401be73c3bf42c2e61268aa5855379c1 # v2.78.1
|
|
with:
|
|
tool: cargo-llvm-cov
|
|
|
|
- name: Install cargo-nextest
|
|
uses: taiki-e/install-action@184183c2401be73c3bf42c2e61268aa5855379c1 # v2.78.1
|
|
with:
|
|
tool: cargo-nextest
|
|
|
|
- name: Install llvm-tools-preview for llvm-cov
|
|
run: rustup component add llvm-tools-preview
|
|
|
|
- name: Install pnpm (for compatibility check)
|
|
uses: pnpm/setup@b1cac37306e39c21283b9dd6cb0ac288fb35ba6b
|
|
with:
|
|
install: false
|
|
|
|
- name: Cache pnpm
|
|
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
|
with:
|
|
key: codecov-pnpm-v11-${{ runner.os }}
|
|
path: |
|
|
${{ env.PNPM_HOME }}/store/v11
|
|
${{ env.HOME }}/.local/share/pnpm/store/v11
|
|
timeout-minutes: 1
|
|
continue-on-error: true
|
|
|
|
- name: Install just
|
|
uses: taiki-e/install-action@184183c2401be73c3bf42c2e61268aa5855379c1 # v2.78.1
|
|
with:
|
|
tool: just
|
|
|
|
- name: Install dependencies
|
|
run: just install
|
|
|
|
- name: Run
|
|
run: |
|
|
# removing env vars is a temporary workaround for unit tests in pacquet relying on external environment
|
|
# this should be removed in the future
|
|
unset PNPM_HOME
|
|
unset XDG_DATA_HOME
|
|
|
|
cargo codecov --lcov --output-path lcov.info
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: codecov
|
|
path: lcov.info
|
|
|
|
# codecov often fails, use another workflow for retry
|
|
upload-codecov:
|
|
name: Upload coverage file
|
|
runs-on: ubuntu-latest
|
|
needs: coverage
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Download coverage file
|
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
with:
|
|
name: codecov
|
|
|
|
- name: Upload to codecov.io
|
|
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
fail_ci_if_error: true
|
|
files: lcov.info
|