Skip to content

Commit

Permalink
ci: refactoring cypress [no ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Yakutoc committed Jun 4, 2024
1 parent 661b54e commit b60275d
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/cypress-release-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Отдельный workflow для pull request из ветки release_**-**-** в master.
# Запуск cypress тестов без каких либо условий.
# Мотивация - нужен стенд для проведения регрессионного тестирования релизных изменений.
name: Cypress component testing on release branch

on:
pull_request:
branches:
- master

concurrency:
# New commit on branch cancels running workflows of the same branch
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
cypress:
if: ${{ startsWith(github.head_ref, 'release') }}
strategy:
fail-fast: false
matrix:
scope: [web,b2c,ui]

uses: ./.github/workflows/cypress-common.yml
with:
scope: ${{ matrix.scope }}
with-artifacts: true
secrets: inherit

cypress-react-17:
if: ${{ startsWith(github.head_ref, 'release') }}
strategy:
fail-fast: false
matrix:
scope: [web,b2c,ui]

uses: ./.github/workflows/cypress-common.yml
with:
scope: ${{ matrix.scope }}
with-react-17: true
with-artifacts: true
secrets: inherit
4 changes: 2 additions & 2 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

cypress:
needs: state
if: ${{ fromJSON(needs.state.outputs.STATE).HAS_PACKAGES_CYPRESS_RUN }}
if: ${{ !startsWith(github.head_ref, 'release') && fromJSON(needs.state.outputs.STATE).HAS_PACKAGES_CYPRESS_RUN }}
strategy:
fail-fast: false
matrix:
Expand All @@ -34,7 +34,7 @@ jobs:

cypress-react-17:
needs: state
if: ${{ fromJSON(needs.state.outputs.STATE).HAS_PACKAGES_CYPRESS_RUN }}
if: ${{ !startsWith(github.head_ref, 'release') && fromJSON(needs.state.outputs.STATE).HAS_PACKAGES_CYPRESS_RUN }}
strategy:
fail-fast: false
matrix:
Expand Down

0 comments on commit b60275d

Please sign in to comment.