Skip to content

Commit 2447afc

Browse files
authored
build: wait on passing cypress (Uniswap#4076)
* build: wait on passing cypress * build: video upload
1 parent 8eef757 commit 2447afc

3 files changed

Lines changed: 31 additions & 2 deletions

File tree

.github/workflows/release.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,19 @@ jobs:
7171
with:
7272
cidv0: ${{ steps.pinata.outputs.hash }}
7373

74-
# Delay updating DNS to give IPFS a chance to propagate.
75-
- run: sleep 600
74+
- uses: actions/cache@v3
75+
id: cypress-cache
76+
with:
77+
path: /home/runner/.cache/Cypress
78+
key: ${{ runner.os }}-cypress-${{ hashFiles('node_modules/cypress') }}
79+
- if: steps.cypress-cache.outputs.cache-hit != 'true'
80+
run: yarn cypress install
81+
- uses: cypress-io/github-action@v4
82+
with:
83+
install: false
84+
browser: chrome
85+
config-file: cypress.release.config.ts
86+
config: baseUrl=https://cloudflare-ipfs.com/ipfs/${{ steps.pinata.outputs.hash }}
7687

7788
- name: Update DNS with new IPFS hash
7889
env:

cypress.release.config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { defineConfig } from 'cypress'
2+
3+
export default defineConfig({
4+
projectId: 'yp82ef',
5+
pageLoadTimeout: 60000,
6+
retries: 30,
7+
e2e: {
8+
specPattern: 'cypress/release.ts',
9+
},
10+
})

cypress/release.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
describe('Release', () => {
2+
it('loads swap page', () => {
3+
cy.visit('/', {
4+
retryOnStatusCodeFailure: true,
5+
retryOnNetworkFailure: true,
6+
}).get('#swap-page')
7+
})
8+
})

0 commit comments

Comments
 (0)