我在我的项目中使用Codecovv2 GitHub 操作,但我正在努力让任何配置与我的工作流文件一起使用。
我的codecov.yml
文件workflows
夹中有一个正在运行的文件(我将附上它),但似乎无法使用此处的任何配置通过我的工作流程配置操作
我错过了什么?
我正在尝试简化我的覆盖测试:
# This is a basic workflow to help you get started with Actions
name: Codecov report
# Controls when the workflow will run
on:
# Triggers the workflow on pull request events but only for the main branch
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Set up Node js
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: '14'
# install npm dependencies
- name: Install dependencies
run: npm install
# Run unit tests
- name: Run unit tests
run: npm run test:unit
# Runs a set of commands using the runners shell
- name: Codecov
uses: codecov/codecov-action@v2
with:
token: 9a61564f-eff0-4f1c-998b-9a1698e26615
files: ./coverage/clover.xml
# coverage settings
coverage:
status:
project:
default:
target: auto
# adjust accordingly based on how flaky your tests are
# this allows a 10% drop from the previous base commit coverage
threshold: 10%