Skip to content

fix: resolve symlink with nested node_modules (#125) #298

fix: resolve symlink with nested node_modules (#125)

fix: resolve symlink with nested node_modules (#125) #298

Workflow file for this run

name: Code Coverage # Run cargo-llvm-cov and upload to codecov.io
permissions: {}
on:
workflow_dispatch:
pull_request:
types:
- opened
- synchronize
paths:
- "src/**/*.rs"
- "Cargo.lock"
push:
branches:
- main
paths:
- "src/**/*.rs"
- "Cargo.lock"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1
- uses: ./.github/actions/pnpm
- uses: oxc-project/setup-rust@cd82e1efec7fef815e2c23d296756f31c7cdc03d # v1.0.0
with:
cache-key: codecov
save-cache: ${{ github.ref_name == 'main' }}
tools: cargo-llvm-cov
components: llvm-tools-preview
- run: cargo llvm-cov --lcov --output-path lcov.info
- name: Upload Artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
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
# Check if the event is not triggered by a fork by checking whether CODECOV_TOKEN is set
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- name: Checkout
if: env.CODECOV_TOKEN
uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1
- name: Download coverage file
if: env.CODECOV_TOKEN
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: codecov
- name: Upload to codecov.io
if: env.CODECOV_TOKEN
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: lcov.info