Skip to content

Dev CI/CD

Dev CI/CD #2471

Workflow file for this run

name: Dev CI/CD
on:
deployment_status:
jobs:
test_setup:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
ui-tests:
timeout-minutes: 60
needs: test_setup
if: (github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success')
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
[
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
# A workaround for Cypress to work with Currents https://github.com/currents-dev/gh-actions-example/blob/main/.github/workflows/currents.yml
# Install Currents
- name: Install dependencies
run: |
pnpm i
- name: Unblock Cypress
working-directory: "tests"
run: |
echo πŸ•ŠοΈ Download Free Cypress
CYPRESS_DOWNLOAD_MIRROR=https://cy-cdn.currents.dev pnpm add cypress@12.17.4 --force
echo βœ… Verify Cypress
npx cypress verify
echo πŸ‘€ Cypress Cache
npx cypress cache list
npx cypress cache path
- name: Cypress tests
uses: cypress-io/github-action@v6
with:
install: false
command: pnpm cypress-cloud run --record --parallel --key ${{ secrets.V2_CYPRESS_RECORD_KEY }} --group UI --ci-build-id ${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt}} --env TAGS="not @ignoreDuringUI",STATIC_BALANCE_ACCOUNT_PRIVATE_KEY=${{ secrets.STATIC_BALANCE_ACCOUNT_PRIVATE_KEY }},ONGOING_STREAM_ACCOUNT_PRIVATE_KEY=${{ secrets.ONGOING_STREAM_ACCOUNT_PRIVATE_KEY }},TX_ACCOUNT_PRIVATE_KEY1=${{ secrets.TX_ACCOUNT_PRIVATE_KEY1 }},TX_ACCOUNT_PRIVATE_KEY2=${{ secrets.TX_ACCOUNT_PRIVATE_KEY2 }},TX_ACCOUNT_PRIVATE_KEY3=${{ secrets.TX_ACCOUNT_PRIVATE_KEY3 }},TX_ACCOUNT_PRIVATE_KEY4=${{ secrets.TX_ACCOUNT_PRIVATE_KEY4 }}
working-directory: tests
env:
CYPRESS_baseUrl: ${{ github.event.deployment_status.environment_url }}
rejected-tests:
timeout-minutes: 45
needs: test_setup
if: (github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' && github.event.deployment_status.environment == 'Preview')
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container: [1,2]
network:
[
"gnosis",
"polygon",
"optimism",
"arbitrum-one",
"avalanche",
"avalanche-fuji",
"bsc",
# "ethereum",
"sepolia",
"opsepolia",
"scrsepolia",
"base",
]
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Setup pnpm
uses: pnpm/action-setup@v4
# A workaround for Cypress to work with Currents https://github.com/currents-dev/gh-actions-example/blob/main/.github/workflows/currents.yml
# Install Currents
- name: Install dependencies
run: |
pnpm i
- name: Unblock Cypress
working-directory: "tests"
run: |
echo πŸ•ŠοΈ Download Free Cypress
CYPRESS_DOWNLOAD_MIRROR=https://cy-cdn.currents.dev pnpm add cypress@12.17.4 --force
echo βœ… Verify Cypress
npx cypress verify
echo πŸ‘€ Cypress Cache
npx cypress cache list
npx cypress cache path
- name: Cypress tests
uses: cypress-io/github-action@v6
with:
install: false
command: pnpm cypress-cloud run --record --parallel --key ${{ secrets.V2_CYPRESS_RECORD_KEY }} --group rejected-${{ matrix.network }} --ci-build-id ${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt}} --env network=${{ matrix.network }},TAGS=@rejected,STATIC_BALANCE_ACCOUNT_PRIVATE_KEY=${{ secrets.STATIC_BALANCE_ACCOUNT_PRIVATE_KEY }},ONGOING_STREAM_ACCOUNT_PRIVATE_KEY=${{ secrets.ONGOING_STREAM_ACCOUNT_PRIVATE_KEY }},TX_ACCOUNT_PRIVATE_KEY1=${{ secrets.TX_ACCOUNT_PRIVATE_KEY1 }},TX_ACCOUNT_PRIVATE_KEY2=${{ secrets.TX_ACCOUNT_PRIVATE_KEY2 }},TX_ACCOUNT_PRIVATE_KEY3=${{ secrets.TX_ACCOUNT_PRIVATE_KEY3 }},TX_ACCOUNT_PRIVATE_KEY4=${{ secrets.TX_ACCOUNT_PRIVATE_KEY4 }}
working-directory: tests
env:
CYPRESS_baseUrl: ${{ github.event.deployment_status.environment_url }}
gnosis-safe-tests:
timeout-minutes: 30
needs: test_setup
if: (github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' && github.event.deployment_status.environment == 'Preview')
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Setup pnpm
uses: pnpm/action-setup@v4
# A workaround for Cypress to work with Currents https://github.com/currents-dev/gh-actions-example/blob/main/.github/workflows/currents.yml
# Install Currents
- name: Install dependencies
run: |
pnpm i
- name: Unblock Cypress
working-directory: "tests"
run: |
echo πŸ•ŠοΈ Download Free Cypress
CYPRESS_DOWNLOAD_MIRROR=https://cy-cdn.currents.dev pnpm add cypress@12.17.4 --force
echo βœ… Verify Cypress
npx cypress verify
echo πŸ‘€ Cypress Cache
npx cypress cache list
npx cypress cache path
- name: Cypress tests
uses: cypress-io/github-action@v6
with:
install: false
working-directory: tests
command: pnpm cypress-cloud run --browser chrome --config chromeWebSecurity=false --record --parallel --key ${{ secrets.V2_CYPRESS_RECORD_KEY }} --group Gnosis --ci-build-id ${{ github.repository }}-${{ github.run_id }}-${{ github.run_attempt}} --env TAGS=@Gnosis
env:
CYPRESS_baseUrl: ${{ github.event.deployment_status.environment_url }}