小编Tob*_*obi的帖子

更新:将所有更新合并到一个分支/PR

一旦有新版本,Renovate 就会更新软件包。但 renovate 还会为每次更新创建一个单独的 PR/分支。因此,如果为我的 5 个包 renovate 发布的新版本将创建 5 个分支。\n这会导致 5 个管道,其中 1 个 PR 被合并,其他 4 个将重新设置基础并再次运行管道。因此,每次合并时将运行 15 个 PR 管道 + 分支管道main
\n因此总共将运行 19 个管道。

\n

是否可以将 \xe2\x80\x93 假设所有次要更新和补丁更新 \xe2\x80\x93 合并到一个分支和 PR 中,以避免出现大量 PR?

\n

我发现的唯一的事情是prConcurrentLimit它避免了每次合并时 PR 管道的变基和重新运行。但这也会触发 10 个管道。

\n

如果我可以将所有内容组合在一起,则只有 1 个 PR 管道和 1 个main分支管道。所以总共有2条管道。那将是真棒。

\n

pipeline config renovate

14
推荐指数
1
解决办法
6847
查看次数

在 Windows 环境下的 GithubActions 中运行 cypress

我想在 github 操作中运行我的 cypress 测试。应该对 firefox、chrome 和 edge 进行测试。赛普拉斯支持所有这些:https : //github.com/cypress-io/github-action#browser

虽然 Firefox 和 chrome 运行良好,但边缘设置并不是那么完美。这是因为边缘浏览器在 github 操作中的 Windows 系统上运行。

这是构建 next.js 应用程序的 yml 文件,然后使用边缘浏览器对其进行测试:

build:
  runs-on: ubuntu-latest
  steps:
    - name: Checkout code
      uses: actions/checkout@v2

    - uses: actions/setup-node@v2-beta
      with:
        node-version: "12"

    - name: Get yarn cache directory path
      id: yarn-cache-dir-path
      run: echo "::set-output name=dir::$(yarn cache dir)"

    - name: Cache node_modules
      id: yarn-cache
      uses: actions/cache@v2
      with:
        path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
        key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}

    - name: Install Dependencies …
Run Code Online (Sandbox Code Playgroud)

windows continuous-integration cypress nestjs github-actions

7
推荐指数
1
解决办法
603
查看次数

github工作流程仅在deployment_status和特定分支上

与此问题类似How to run Github Actions with the 'deployment_status' kitty and only on the QAS Branch? 我想仅在特定分支上执行工作流程,但与deployment_status触发器结合使用。

因此,我只想在部署完成并且我们位于分支上时才执行端到端测试develop

这里的问题是:在触发器上未设置变量deployment_statusgithub.ref它也写在文档中。所以我无法手动检查我是否在正确的分支上。

name: E2E

on:
  deployment_status:
    # does not work because it is ignored on deployment_status
    branches:
      - develop
      - stage
      - master
      - main

jobs:
  chrome:
    if: github.event.deployment_status.state == 'success'
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v2
      
      - name: Run Cypress
        uses: cypress-io/github-action@v2
        with:
          browser: chrome
          cache-key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} …
Run Code Online (Sandbox Code Playgroud)

github vercel github-actions

7
推荐指数
0
解决办法
1421
查看次数

Rubocop JSON:如果方法调用的参数跨越多行,则对齐它们

我在测试文件中遇到了 Rubocop 问题。起初,这是我现在的代码:

should 'should show user' do
  get user_url(@user),
    headers: @header
  assert_response :success
end

should 'should update user' do
  patch user_url(@user),
    params: {
      data: {
        attributes: {
          name: @user.name
        }
      }
    }, headers: @header
  assert_response :success
end
Run Code Online (Sandbox Code Playgroud)

这就是 Rubocop 错误输出:

test/controllers/users_controller_test.rb:34:9: C: Align the parameters of a method call if they span more than one line.
        headers: @header
        ^^^^^^^^^^^^^^^^
test/controllers/users_controller_test.rb:40:9: C: Align the parameters of a method call if they span more than one line.
        params: { ...
        ^^^^^^^^^ …
Run Code Online (Sandbox Code Playgroud)

ruby json ruby-on-rails rubocop ruby-style-guide

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