Simplify Cypress GHA
This commit is contained in:
		
							parent
							
								
									e7e907d535
								
							
						
					
					
						commit
						3d75022a6c
					
				
							
								
								
									
										86
									
								
								.github/workflows/cypress.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										86
									
								
								.github/workflows/cypress.yml
									
									
									
									
										vendored
									
									
								
							| @ -10,82 +10,50 @@ jobs: | |||||||
|     strategy: |     strategy: | ||||||
|       fail-fast: false |       fail-fast: false | ||||||
|       matrix: |       matrix: | ||||||
|         containers: [1, 2, 3, 4, 5] |         module: ["mempool", "liquid", "bisq"] | ||||||
|         os: ["ubuntu-latest"] |         include: | ||||||
|         browser: [chrome] |           - module: "mempool" | ||||||
|     name: E2E tests on ${{ matrix.browser }} - ${{ matrix.os }} |             spec: | | ||||||
|  |               cypress/e2e/mainnet/*.spec.ts | ||||||
|  |               cypress/e2e/signet/*.spec.ts | ||||||
|  |               cypress/e2e/testnet/*.spec.ts | ||||||
|  |           - module: "liquid" | ||||||
|  |             spec: | | ||||||
|  |               cypress/e2e/liquid/liquid.spec.ts | ||||||
|  |               cypress/e2e/liquidtestnet/liquidtestnet.spec.ts | ||||||
|  |           - module: "bisq" | ||||||
|  |             spec: | | ||||||
|  |               cypress/e2e/bisq/bisq.spec.ts | ||||||
|  |            | ||||||
|  |     name: E2E tests for ${{ matrix.module }} | ||||||
|     steps: |     steps: | ||||||
|       - name: Checkout |       - name: Checkout | ||||||
|         uses: actions/checkout@v2 |         uses: actions/checkout@v2 | ||||||
|  |         with: | ||||||
|  |           path: ${{ matrix.module }} | ||||||
|  |            | ||||||
|       - name: Setup node |       - name: Setup node | ||||||
|         uses: actions/setup-node@v2 |         uses: actions/setup-node@v2 | ||||||
|         with: |         with: | ||||||
|           node-version: 16.15.0 |           node-version: 16.15.0 | ||||||
|           cache: 'npm' |           cache: 'npm' | ||||||
|           cache-dependency-path: frontend/package-lock.json |           cache-dependency-path: ${{ matrix.module }}/frontend/package-lock.json | ||||||
|       - name: ${{ matrix.browser }} browser tests (Mempool) |           path: ${{ matrix.module }} | ||||||
|         uses: cypress-io/github-action@v4 |  | ||||||
|         with: |  | ||||||
|           tag: ${{ github.event_name }} |  | ||||||
|           working-directory: frontend |  | ||||||
|           build: npm run config:defaults:mempool |  | ||||||
|           start: npm run start:local-staging |  | ||||||
|           wait-on: 'http://localhost:4200' |  | ||||||
|           wait-on-timeout: 120 |  | ||||||
|           record: true |  | ||||||
|           parallel: true |  | ||||||
|           spec: | |  | ||||||
|             cypress/e2e/mainnet/*.spec.ts |  | ||||||
|             cypress/e2e/signet/*.spec.ts |  | ||||||
|             cypress/e2e/testnet/*.spec.ts |  | ||||||
|           group: Tests on ${{ matrix.browser }} (Mempool) |  | ||||||
|           browser: ${{ matrix.browser }} |  | ||||||
|           ci-build-id: '${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}' |  | ||||||
|         env: |  | ||||||
|           COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} |  | ||||||
|           CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} |  | ||||||
|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |  | ||||||
|           CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} |  | ||||||
| 
 | 
 | ||||||
|       - name: ${{ matrix.browser }} browser tests (Liquid) |       - name: Chrome browser tests (${{ matrix.module }}) | ||||||
|         uses: cypress-io/github-action@v4 |         uses: cypress-io/github-action@v4 | ||||||
|         if: always() |  | ||||||
|         with: |         with: | ||||||
|           tag: ${{ github.event_name }} |           tag: ${{ github.event_name }} | ||||||
|           working-directory: frontend |           working-directory: ${{ matrix.module }}/frontend | ||||||
|           build: npm run config:defaults:liquid |           build: npm run config:defaults:${{ matrix.module }} | ||||||
|           start: npm run start:local-staging |           start: npm run start:local-staging | ||||||
|           wait-on: 'http://localhost:4200' |           wait-on: 'http://localhost:4200' | ||||||
|           wait-on-timeout: 120 |           wait-on-timeout: 120 | ||||||
|           record: true |           record: true | ||||||
|           parallel: true |           parallel: true | ||||||
|           spec: | |           spec: ${{ matrix.spec }} | ||||||
|             cypress/e2e/liquid/liquid.spec.ts |           group: Tests on Chrome (${{ matrix.module }}) | ||||||
|             cypress/e2e/liquidtestnet/liquidtestnet.spec.ts |           browser: "chrome" | ||||||
|           group: Tests on ${{ matrix.browser }} (Liquid) |  | ||||||
|           browser: ${{ matrix.browser }} |  | ||||||
|           ci-build-id: '${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}' |  | ||||||
|         env: |  | ||||||
|           COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} |  | ||||||
|           CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} |  | ||||||
|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |  | ||||||
|           CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} |  | ||||||
| 
 |  | ||||||
|       - name: ${{ matrix.browser }} browser tests (Bisq) |  | ||||||
|         uses: cypress-io/github-action@v4 |  | ||||||
|         if: always() |  | ||||||
|         with: |  | ||||||
|           tag: ${{ github.event_name }} |  | ||||||
|           working-directory: frontend |  | ||||||
|           build: npm run config:defaults:bisq |  | ||||||
|           start: npm run start:local-staging |  | ||||||
|           wait-on: 'http://localhost:4200' |  | ||||||
|           wait-on-timeout: 120 |  | ||||||
|           record: true |  | ||||||
|           parallel: true |  | ||||||
|           spec: cypress/e2e/bisq/bisq.spec.ts |  | ||||||
|           group: Tests on ${{ matrix.browser }} (Bisq) |  | ||||||
|           browser: ${{ matrix.browser }} |  | ||||||
|           ci-build-id: '${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}' |           ci-build-id: '${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}' | ||||||
|         env: |         env: | ||||||
|           COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} |           COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title }} | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user