WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

chore(deps): update github-actions (#93) #115

chore(deps): update github-actions (#93)

chore(deps): update github-actions (#93) #115

Workflow file for this run

# Run cargo-llvm-cov and upload to codecov.io
name: Code Coverage
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
paths:
- "**.rs"
- ".github/workflows/codecov.yml"
push:
branches:
- main
paths:
- "**.rs"
- ".github/workflows/codecov.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
jobs:
coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1
- 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
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version-file: .node-version
cache: pnpm
- run: pnpm install
- run: cargo llvm-cov --lcov --output-path lcov.info
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.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
# Check if the event is not triggered by a fork by checking whether CODECOV_TOKEN is set
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1
if: env.CODECOV_TOKEN
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
if: env.CODECOV_TOKEN
with:
name: codecov
- uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
if: env.CODECOV_TOKEN
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: lcov.info