Skip to content

Revert "fix: temp disable avax incentives " [skip cypress] (#2157) #7625

Revert "fix: temp disable avax incentives " [skip cypress] (#2157)

Revert "fix: temp disable avax incentives " [skip cypress] (#2157) #7625

name: Build and deploy to IPFS
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
on:
push:
branches: ['main']
jobs:
build:
runs-on: ubuntu-latest
if: |
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
(github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name &&
!contains(github.head_ref, 'dependabot'))
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
with:
persist-credentials: false
- name: Build App
uses: ./.github/actions/build
with:
NEXT_PUBLIC_ENV: 'prod'
NEXT_PUBLIC_FORK_BASE_CHAIN_ID: ${{ secrets[format('FORK_BASE_CHAIN_ID_{0}', github.event.pull_request.number)] }}
NEXT_PUBLIC_FORK_CHAIN_ID: ${{ secrets[format('FORK_CHAIN_ID_{0}', github.event.pull_request.number)] }}
NEXT_PUBLIC_FORK_URL_RPC: ${{ secrets[format('FORK_URL_RPC_{0}', github.event.pull_request.number)] }}
NEXT_PUBLIC_MIXPANEL: ${{ secrets.NEXT_PUBLIC_MIXPANEL }}
NEXT_PUBLIC_FIAT_ON_RAMP: 'false'
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
NEXT_PUBLIC_SUBGRAPH_API_KEY: ${{ secrets.NEXT_PUBLIC_SUBGRAPH_API_KEY }}
- name: Upload artifacts
uses: ./.github/actions/upload-artifacts
with:
BUILD_ARTIFACT_NAME: 'out'
build_staging:
runs-on: ubuntu-latest
if: |
github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
with:
persist-credentials: false
- name: Build App
uses: ./.github/actions/build
with:
NEXT_PUBLIC_ENV: 'staging'
- name: Upload artifacts
uses: ./.github/actions/upload-artifacts
with:
BUILD_ARTIFACT_NAME: 'out_staging'
NEXTJS_BUILD: 'false'
PR_INFO: 'false'
cypress_smoke_v2:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip cypress]')"
needs: build
strategy:
fail-fast: false
matrix:
market:
- polygon
- avalanche
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: Run tests
uses: ./.github/actions/cypress
with:
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v2-markets/${{ matrix.market }}-v2-smoke.config.ts
cypress_smoke_v3:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip cypress]')"
needs: build
strategy:
fail-fast: false
matrix:
market:
- polygon
- avalanche
- optimism
- ethereum
- gho
- base
- gnosis
- bnb
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: Run tests
uses: ./.github/actions/cypress
with:
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-smoke.config.ts
next_js_analyze:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: download build
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0
with:
name: nextjs_build
path: .next
- uses: ./.github/actions/analyze-comment
if: github.event_name != 'pull_request'
- uses: ./.github/actions/analyze-comment
if: github.event_name == 'pull_request'
with:
PULL_REQUEST_NUMBER: ${{ github.event.number }}
deploy:
runs-on: ubuntu-latest
needs:
- build
outputs:
pinata_hash: '${{ steps.pinata.outputs.hash }}'
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: download build
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0
with:
name: out
path: out
- name: pinata
id: pinata
uses: aave/pinata-action@a3409e26f4cb859a2d9984109317caac53db5f68
with:
PINATA_API_KEY: ${{ secrets.PINATA_API_KEY }}
PINATA_SECRET_KEY: ${{ secrets.PINATA_SECRET_KEY }}
PIN_ALIAS: 'app-aave-${{ github.head_ref || github.ref }}'
BUILD_LOCATION: './out'
CID_VERSION: 1
cypress_full_v2:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip cypress]')"
needs:
- deploy
- cypress_smoke_v2
- cypress_smoke_v3
strategy:
fail-fast: false
matrix:
market:
- polygon
- avalanche
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: Run tests
uses: ./.github/actions/cypress
with:
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v2-markets/${{ matrix.market }}-v2-full.config.ts
cypress_full_v3:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip cypress]')"
needs:
- deploy
- cypress_smoke_v2
- cypress_smoke_v3
strategy:
fail-fast: false
matrix:
market:
- polygon
- optimism
- ethereum
- gho
- base
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: Run tests
uses: ./.github/actions/cypress
with:
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-full.config.ts
cypress_app_functionality:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip cypress]')"
needs:
- deploy
- cypress_smoke_v2
- cypress_smoke_v3
strategy:
fail-fast: false
matrix:
scoupe:
- settings
- mobile
- governance-stake
- widgets
- general
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: Run tests
uses: ./.github/actions/cypress
with:
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/${{ matrix.scoupe }}.config.ts
update_domains:
if: |
github.event_name == 'push' &&
github.ref == 'refs/heads/main' &&
!contains(github.event.head_commit.message, '[skip cypress]')
needs:
- deploy
- build_staging
- cypress_full_v2
- cypress_full_v3
- cypress_app_functionality
uses: ./.github/workflows/update-prod-staging.yml
with:
PINATA_HASH: '${{ needs.deploy.outputs.pinata_hash }}'
secrets: inherit
update_domains_no_cypress:
if: |
github.event_name == 'push' &&
github.ref == 'refs/heads/main' &&
contains(github.event.head_commit.message, '[skip cypress]')
needs:
- deploy
- build_staging
uses: ./.github/workflows/update-prod-staging.yml
with:
PINATA_HASH: '${{ needs.deploy.outputs.pinata_hash }}'
secrets: inherit