|
1 | | -name: CI Pipeline |
| 1 | +name: CI |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
@@ -102,58 +102,98 @@ jobs: |
102 | 102 | name: Cypress - Dashboard |
103 | 103 | runs-on: ubuntu-latest |
104 | 104 | needs: docker-build |
| 105 | + |
105 | 106 | steps: |
106 | | - - uses: actions/checkout@v4 |
107 | | - - uses: cypress-io/github-action@v6 |
108 | | - with: |
109 | | - start: npm run build |
110 | | - wait-on: 'http://localhost:5173' |
111 | | - spec: cypress/e2e/dashboard/**/*.cy.ts |
| 107 | + - uses: actions/checkout@v4 |
| 108 | + |
| 109 | + - name: Build Docker image |
| 110 | + run: docker build -t web-ui:test . |
| 111 | + |
| 112 | + - name: Start container |
| 113 | + run: docker run -d -p 3000:80 web-ui:test |
| 114 | + |
| 115 | + - name: Wait for app |
| 116 | + run: npx wait-on http://localhost:3000 |
| 117 | + |
| 118 | + - name: Run Cypress |
| 119 | + run: npx cypress run --spec "cypress/e2e/dashboard/**/*.cy.ts" |
112 | 120 |
|
113 | 121 | cypress-events: |
114 | 122 | name: Cypress - Events |
115 | 123 | runs-on: ubuntu-latest |
116 | 124 | needs: docker-build |
| 125 | + |
117 | 126 | steps: |
118 | | - - uses: actions/checkout@v4 |
119 | | - - uses: cypress-io/github-action@v6 |
120 | | - with: |
121 | | - start: npm run build |
122 | | - wait-on: 'http://localhost:5173' |
123 | | - spec: cypress/e2e/dashboard/**/*.cy.ts |
| 127 | + - uses: actions/checkout@v4 |
| 128 | + |
| 129 | + - name: Build Docker image |
| 130 | + run: docker build -t web-ui:test . |
| 131 | + |
| 132 | + - name: Start container |
| 133 | + run: docker run -d -p 3000:80 web-ui:test |
| 134 | + |
| 135 | + - name: Wait for app |
| 136 | + run: npx wait-on http://localhost:3000 |
| 137 | + |
| 138 | + - name: Run Cypress |
| 139 | + run: npx cypress run --spec "cypress/e2e/dashboard/**/*.cy.ts" |
124 | 140 |
|
125 | 141 | cypress-insights: |
126 | 142 | name: Cypress - Insights |
127 | 143 | runs-on: ubuntu-latest |
128 | 144 | needs: docker-build |
| 145 | + |
129 | 146 | steps: |
130 | | - - uses: actions/checkout@v4 |
131 | | - - uses: cypress-io/github-action@v6 |
132 | | - with: |
133 | | - start: npm run build |
134 | | - wait-on: 'http://localhost:5173' |
135 | | - spec: cypress/e2e/dashboard/**/*.cy.ts |
| 147 | + - uses: actions/checkout@v4 |
| 148 | + |
| 149 | + - name: Build Docker image |
| 150 | + run: docker build -t web-ui:test . |
| 151 | + |
| 152 | + - name: Start container |
| 153 | + run: docker run -d -p 3000:80 web-ui:test |
| 154 | + |
| 155 | + - name: Wait for app |
| 156 | + run: npx wait-on http://localhost:3000 |
| 157 | + |
| 158 | + - name: Run Cypress |
| 159 | + run: npx cypress run --spec "cypress/e2e/dashboard/**/*.cy.ts" |
136 | 160 |
|
137 | 161 | cypress-organizations: |
138 | 162 | name: Cypress - Organizations |
139 | 163 | runs-on: ubuntu-latest |
140 | 164 | needs: docker-build |
| 165 | + |
141 | 166 | steps: |
142 | | - - uses: actions/checkout@v4 |
143 | | - - uses: cypress-io/github-action@v6 |
144 | | - with: |
145 | | - start: npm run build |
146 | | - wait-on: 'http://localhost:5173' |
147 | | - spec: cypress/e2e/dashboard/**/*.cy.ts |
| 167 | + - uses: actions/checkout@v4 |
| 168 | + |
| 169 | + - name: Build Docker image |
| 170 | + run: docker build -t web-ui:test . |
| 171 | + |
| 172 | + - name: Start container |
| 173 | + run: docker run -d -p 3000:80 web-ui:test |
| 174 | + |
| 175 | + - name: Wait for app |
| 176 | + run: npx wait-on http://localhost:3000 |
| 177 | + |
| 178 | + - name: Run Cypress |
| 179 | + run: npx cypress run --spec "cypress/e2e/dashboard/**/*.cy.ts" |
148 | 180 |
|
149 | 181 | cypress-user: |
150 | 182 | name: Cypress - User |
151 | 183 | runs-on: ubuntu-latest |
152 | 184 | needs: docker-build |
| 185 | + |
153 | 186 | steps: |
154 | | - - uses: actions/checkout@v4 |
155 | | - - uses: cypress-io/github-action@v6 |
156 | | - with: |
157 | | - start: npm run build |
158 | | - wait-on: 'http://localhost:5173' |
159 | | - spec: cypress/e2e/dashboard/**/*.cy.ts |
| 187 | + - uses: actions/checkout@v4 |
| 188 | + |
| 189 | + - name: Build Docker image |
| 190 | + run: docker build -t web-ui:test . |
| 191 | + |
| 192 | + - name: Start container |
| 193 | + run: docker run -d -p 3000:80 web-ui:test |
| 194 | + |
| 195 | + - name: Wait for app |
| 196 | + run: npx wait-on http://localhost:3000 |
| 197 | + |
| 198 | + - name: Run Cypress |
| 199 | + run: npx cypress run --spec "cypress/e2e/dashboard/**/*.cy.ts" |
0 commit comments