fix: cancelled with double 'l' #19308
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| # main and develop branches | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| # build on PR creation/updates | |
| pull_request: | |
| types: [opened, synchronize] | |
| env: | |
| NODE_VERSION: lts/jod | |
| REACT_APP_SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
| REACT_APP_PINATA_API_KEY: ${{ secrets.REACT_APP_PINATA_API_KEY }} | |
| REACT_APP_PINATA_SECRET_API_KEY: ${{ secrets.REACT_APP_PINATA_SECRET_API_KEY }} | |
| REACT_APP_GOOGLE_ANALYTICS_ID: ${{ secrets.REACT_APP_GOOGLE_ANALYTICS_ID }} | |
| REACT_APP_BLOCKNATIVE_API_KEY: ${{ secrets.REACT_APP_BLOCKNATIVE_API_KEY }} | |
| REACT_APP_BFF_BASE_URL: ${{ secrets.BFF_BASE_URL }} | |
| REACT_APP_CMS_BASE_URL: ${{ secrets.CMS_BASE_URL }} | |
| NEXT_PUBLIC_CMS_BASE_URL: ${{ secrets.CMS_BASE_URL }} | |
| PACKAGE_READ_AUTH_TOKEN: ${{ secrets.PACKAGE_READ_AUTH_TOKEN }} | |
| jobs: | |
| setup: | |
| name: Setup | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - name: Set up node | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm run install:ci --frozen-lockfile | |
| - name: Cache generated files | |
| id: cache-generated-files | |
| uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 | |
| with: | |
| path: | | |
| apps/cowswap-frontend/src/locales | |
| key: ${{ runner.os }}-generatedFiles-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| test: | |
| name: Test | |
| needs: setup | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - name: Set up node | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Load generated files | |
| id: cache-generated-files | |
| uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 | |
| with: | |
| path: | | |
| apps/cowswap-frontend/src/locales | |
| key: ${{ runner.os }}-generatedFiles-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| - name: Unit Test | |
| run: pnpm run test | |
| # - name: Coveralls | |
| # uses: coverallsapp/github-action@v1.1.2 | |
| # with: | |
| # github-token: ${{ secrets.GITHUB_TOKEN }} | |
| lint: | |
| name: Lint | |
| needs: setup | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - name: Set up node | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Load generated files | |
| id: cache-generated-files | |
| uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 | |
| with: | |
| path: | | |
| apps/cowswap-frontend/src/locales | |
| key: ${{ runner.os }}-generatedFiles-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| - name: Run eslint | |
| run: pnpm run lint | |
| integration-tests: | |
| name: Cypress | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Increase watchers | |
| run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - name: Set up node | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Install Cypress binary | |
| working-directory: apps/cowswap-frontend-e2e | |
| run: npx cypress install | |
| - name: Start server in the background | |
| run: pnpm run start & | |
| # Actually run tests, building repo | |
| - name: Cypress run | |
| id: cypress-run | |
| uses: cypress-io/github-action@0f330ebf0d60f87608ed72f1d6232e5644aa3171 # v7.1.1 | |
| with: | |
| wait-on: http://[::1]:3000 | |
| wait-on-timeout: 600 | |
| install: false | |
| working-directory: apps/cowswap-frontend-e2e | |
| env: | |
| CYPRESS_INTEGRATION_TEST_PRIVATE_KEY: ${{ secrets.CYPRESS_INTEGRATION_TEST_PRIVATE_KEY }} | |
| CYPRESS_INTEGRATION_TESTS_ALCHEMY_KEY: ${{ secrets.CYPRESS_INTEGRATION_TESTS_ALCHEMY_KEY }} | |
| CYPRESS_INTEGRATION_TESTS_INFURA_KEY: ${{ secrets.CYPRESS_INTEGRATION_TESTS_INFURA_KEY }} | |
| # - uses: actions/upload-artifact@v3 | |
| # if: always() | |
| # with: | |
| # name: cypress-videos | |
| # path: | | |
| # cypress-custom/videos | |
| # cypress-custom/screenshots | |
| # Open tmate ssh connection on failure for debugging | |
| # Uncomment when needed and push upstream | |
| # - name: Setup tmate session | |
| # uses: mxschmitt/action-tmate@v3 | |
| # if: ${{ failure() }} | |
| notify-failure: | |
| name: Notify Slack on Failure | |
| needs: [setup, test, lint] | |
| runs-on: ubuntu-latest | |
| if: failure() && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop') | |
| steps: | |
| - name: Notify Failure | |
| run: | | |
| curl -X POST -H "Content-type: application/json" --data "{\"text\": \"❌ CI failed on $REF_NAME. Check the build at $SERVER_URL/$REPOSITORY/actions/runs/$RUN_ID\"}" "$SLACK_WEBHOOK_URL" | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
| REF_NAME: ${{ github.ref_name }} | |
| SERVER_URL: ${{ github.server_url }} | |
| REPOSITORY: ${{ github.repository }} | |
| RUN_ID: ${{ github.run_id }} |