1- name : Build and Test Frontend
1+ name : Build
22
33on :
44 push :
1313jobs :
1414 build :
1515 runs-on : ubuntu-latest
16-
17- services :
18- docker :
19- image : docker:dind
20- options : --privileged
2116
2217 steps :
2318 - name : Checkout code
@@ -28,108 +23,4 @@ jobs:
2823
2924 - name : Build Docker image
3025 run : |
31- docker build --no-cache -t directcuteo/mina-frontend:latest -f Dockerfile2 .
32-
33- - name : Start frontend server
34- run : |
35- docker run -d --name frontend-server --privileged directcuteo/mina-frontend:latest
36-
37- - name : Setup Node.js for Cypress
38- uses : actions/setup-node@v4
39- with :
40- node-version : ' 18'
41-
42- - name : Cache npm dependencies
43- uses : actions/cache@v3
44- with :
45- path : ~/.npm
46- key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
47- restore-keys : |
48- ${{ runner.os }}-node-
49-
50- - name : Install Cypress dependencies
51- run : npm install
52-
53- test :
54- runs-on : ubuntu-latest
55- needs : build
56-
57- strategy :
58- matrix :
59- test-spec :
60- - " cypress/e2e/dashboard/nodes/dashboard-nodes-table.cy.ts"
61- - " cypress/e2e/network/messages/network-messages-table.cy.ts"
62- - " cypress/e2e/network/blocks/network-blocks-table.cy.ts"
63- - " cypress/e2e/network/blocks/network-blocks-toolbar.cy.ts"
64- - " cypress/e2e/network/blocks/network-blocks-side-panel.cy.ts"
65- - " cypress/e2e/network/blocks-ipc/network-blocks-ipc-table.cy.ts"
66- - " cypress/e2e/network/blocks-ipc/network-blocks-ipc-toolbar.cy.ts"
67- - " cypress/e2e/network/blocks-ipc/network-blocks-ipc-side-panel.cy.ts"
68- - " cypress/e2e/explorer/blocks/explorer-blocks-table.cy.ts"
69- - " cypress/e2e/explorer/snark-pool/explorer-snark-pool-table.cy.ts"
70- - " cypress/e2e/explorer/snark-pool/explorer-snark-pool-toolbar.cy.ts"
71- - " cypress/e2e/explorer/scan-state/explorer-scan-state.cy.ts"
72- - " cypress/e2e/explorer/snark-traces/explorer-snark-traces-table.cy.ts"
73- - " cypress/e2e/explorer/snark-traces/explorer-snark-traces-toolbar.cy.ts"
74- - " cypress/e2e/web-node/wallet/web-node-wallet.cy.ts"
75- - " cypress/e2e/web-node/logs/web-node-logs.cy.ts"
76- - " cypress/e2e/web-node/peers/web-node-peers.cy.ts"
77-
78- services :
79- docker :
80- image : docker:dind
81- options : --privileged
82-
83- steps :
84- - name : Checkout code
85- uses : actions/checkout@v4
86-
87- - name : Set up Docker Buildx
88- uses : docker/setup-buildx-action@v3
89-
90- - name : Build Docker image
91- run : |
92- docker build --no-cache -t directcuteo/mina-frontend:latest -f Dockerfile2 .
93-
94- - name : Start frontend server
95- run : |
96- docker run -d --name frontend-server --privileged directcuteo/mina-frontend:latest
97-
98- - name : Setup Node.js
99- uses : actions/setup-node@v4
100- with :
101- node-version : ' 18'
102-
103- - name : Cache npm dependencies
104- uses : actions/cache@v3
105- with :
106- path : ~/.npm
107- key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
108- restore-keys : |
109- ${{ runner.os }}-node-
110-
111- - name : Install dependencies
112- run : npm install
113-
114- - name : Run Cypress test
115- uses : cypress-io/github-action@v6
116- with :
117- config-file : cypress.config.js
118- spec : ${{ matrix.test-spec }}
119- install : false
120-
121- - name : Upload test videos on failure
122- if : failure()
123- uses : actions/upload-artifact@v3
124- with :
125- name : cypress-videos-${{ strategy.job-index }}
126- path : cypress/videos/
127- retention-days : 7
128-
129- - name : Upload test screenshots on failure
130- if : failure()
131- uses : actions/upload-artifact@v3
132- with :
133- name : cypress-screenshots-${{ strategy.job-index }}
134- path : cypress/screenshots/
135- retention-days : 7
26+ docker build --no-cache -t directcuteo/mina-frontend:latest -f Dockerfile .
0 commit comments