小编Jul*_*ler的帖子

如何使用 cypress github actions 修复丢失的构建脚本?

我尝试添加一个 github 操作,该操作应该使用 cypress 测试我的应用程序。

这就是我的工作流程文件的样子:

name: Cypress Tests

on: [push]

jobs:
  cypress-run:
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: ./client
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      # Install NPM dependencies, cache them correctly
      # and run all Cypress tests
      - name: Setup Node
        uses: actions/setup-node@v1
        with:
          node-version: 14
      - name: Test
        run: |
          ls
          cat package.json
      - name: Cypress run
        uses: cypress-io/github-action@v2.11.7
        with:
          build: npm run build
          start: npm start
      - name: Test
        run: ls
Run Code Online (Sandbox Code Playgroud)

测试步骤包含cat package.json显示的 package.json 文件,如下所示: …

testing reactjs next.js cypress github-actions

4
推荐指数
1
解决办法
1580
查看次数

标签 统计

cypress ×1

github-actions ×1

next.js ×1

reactjs ×1

testing ×1