柏树代码覆盖范围,管道码头保存日志错误

发布于 2025-02-13 14:11:58 字数 1618 浏览 1 评论 0原文

IM在使用“ NPX NYC报告-Reporter = lcov -reporter = text-summary”中运行我的赛普拉斯代码覆盖范围报告。

**

- name: Save logs
        continue-on-error: true
        if: ${{ always() }}
        env:
          COMMIT_SHA: ${{ steps.vars.outputs.sha_short }}
        run: |
          docker ps
          docker cp cypress_test:/cypress-coverage cypress-coverage
      - name: Compress action step
        uses: a7ul/[email protected]
        id: compress
        with:
          command: c
          cwd: .
          files: |
            cypress-coverage
          outPath: test_cypress_coverage.tar
      - name: Archive coverage
        continue-on-error: true
        if: ${{ always() }}
        env:
          COMMIT_SHA: ${{ steps.vars.outputs.sha_short }}
        uses: actions/upload-artifact@v2
        with:
          name: "${{ steps.date.outputs.yyyymmdd }}_E2E_test_coverage_${{ env.COMMIT_SHA }}"
          path: |
            test_cypress_coverage.tar
          retention-days: 7

**

Im using this part for it but there is a error "Error: No such container:path: cypress_test:/cypress-coverage" do you guys have a any idea how to find correct path ? How to see log of coverage result ? Btw i can get artifacts its working as expected but i got save logs error.

“在此处输入图像描述”

im running my cypress code coverage report with using "npx nyc report --reporter=lcov --reporter=text-summary" also i have script which is "yarn e2e:coverage" but i want to see result in github actions log;

**

- name: Save logs
        continue-on-error: true
        if: ${{ always() }}
        env:
          COMMIT_SHA: ${{ steps.vars.outputs.sha_short }}
        run: |
          docker ps
          docker cp cypress_test:/cypress-coverage cypress-coverage
      - name: Compress action step
        uses: a7ul/[email protected]
        id: compress
        with:
          command: c
          cwd: .
          files: |
            cypress-coverage
          outPath: test_cypress_coverage.tar
      - name: Archive coverage
        continue-on-error: true
        if: ${{ always() }}
        env:
          COMMIT_SHA: ${{ steps.vars.outputs.sha_short }}
        uses: actions/upload-artifact@v2
        with:
          name: "${{ steps.date.outputs.yyyymmdd }}_E2E_test_coverage_${{ env.COMMIT_SHA }}"
          path: |
            test_cypress_coverage.tar
          retention-days: 7

**

Im using this part for it but there is a error "Error: No such container:path: cypress_test:/cypress-coverage" do you guys have a any idea how to find correct path ? How to see log of coverage result ? Btw i can get artifacts its working as expected but i got save logs error.

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

埋情葬爱 2025-02-20 14:11:58

如果Compress_test容器具有bash,我会尝试检查:

  • 如果在该阶段的那个阶段产生的日志文件

那将是:

docker exec -it compress_test find / -name "cypress-coverage*"

这样,您可以自己看到文件所在的位置。

If the compress_test container has a bash, I would try and check:

  • if there is a log file produced at that stage
  • where it is.

That would be:

docker exec -it compress_test find / -name "cypress-coverage*"

That way, you can see for yourself where the file is.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文