Skip to content

Commit c943462

Browse files
committed
2 parents 479eb99 + c09aacc commit c943462

File tree

8 files changed

+77
-13
lines changed

8 files changed

+77
-13
lines changed

.github/workflows/api-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
with:
1616
working-directory: ./api
1717
- name: Build containers
18-
run: docker-compose -f "./../docker-compose-ci.yml" build postgres api
18+
run: docker-compose -f "./../docker-compose-ci.yml" build --parallel postgres api
1919
- name: Run database
2020
run: docker-compose -f "./../docker-compose-ci.yml" up --detach postgres
2121
- name: Setup env file

.github/workflows/playwright-test.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,13 @@ jobs:
1515
with:
1616
working-directory: ./client
1717
- name: Build containers
18-
run: docker-compose -f "./../docker-compose-ci.yml" build
19-
# - name: Install client node_modules
20-
# run: docker-compose run client yarn
21-
# - name: Install api composer
22-
# run: docker-compose run api composer install --no-cache --ignore-platform-reqs
18+
run: docker-compose -f "./../docker-compose-ci.yml" build --parallel
2319
- name: Install playwright dependencies
2420
run: docker-compose run playwright yarn
2521
- name: Up environment
2622
run: docker-compose -f "./../docker-compose-ci.yml" up --detach api client postgres
23+
- name: Wait
24+
run: sleep 5
2725
- name: Run tests
2826
run: docker-compose run playwright npx playwright test
2927
- name: Stop containers

.gitpod.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ ports:
99
- port: 3306
1010
onOpen: ignore
1111
- port: 8000
12-
onOpen: open-browser
12+
onOpen: ignore
1313
- port: 3000
14-
onOpen: open-browser
14+
onOpen: ignore
1515

1616
vscode:
1717
extensions:

client/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ dist-ssr
2222
*.njsproj
2323
*.sln
2424
*.sw?
25+
26+
playwright/playwright-report

client/playwright-report/index.html

Lines changed: 62 additions & 0 deletions
Large diffs are not rendered by default.

client/playwright.config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import { defineConfig, devices } from '@playwright/test';
66
*/
77
// require('dotenv').config();
88

9+
process.env.PW_CLIENT_URL = 'http://client:3000'
10+
911
/**
1012
* See https://playwright.dev/docs/test-configuration.
1113
*/
@@ -18,7 +20,7 @@ export default defineConfig({
1820
* Maximum time expect() should wait for the condition to be met.
1921
* For example in `await expect(locator).toHaveText();`
2022
*/
21-
timeout: 5000
23+
timeout: process.env.CI ? 30000 : 5000
2224
},
2325
/* Run tests in files in parallel */
2426
fullyParallel: true,
@@ -29,7 +31,7 @@ export default defineConfig({
2931
/* Opt out of parallel tests on CI. */
3032
workers: process.env.CI ? 1 : 1,
3133
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
32-
reporter: 'html',
34+
reporter: [['html', {open: 'never'}]],
3335
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
3436
use: {
3537
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { test, expect } from '@playwright/test';
22

33
test('loads the app', async ({ page }) => {
4-
await page.goto('http://localhost:3000');
4+
await page.goto(process.env.PW_CLIENT_URL);
55

6-
await expect(page).toHaveURL(/localhost:3000/);
6+
await expect(page).toHaveURL(process.env.PW_CLIENT_URL);
77
});

dev-env/php-ci.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ RUN docker-php-ext-enable xdebug
2323

2424
COPY ./api .
2525

26-
RUN composer install --no-dev --no-cache --ignore-platform-reqs
26+
RUN composer install --no-cache --ignore-platform-reqs

0 commit comments

Comments
 (0)