11name : E2E tests
22on :
33 push :
4- branches : [ main ]
4+ branches : [main]
55 pull_request :
6- branches : [ main ]
6+ branches : [main]
77jobs :
88 test :
99 timeout-minutes : 60
1010 runs-on : ubuntu-latest
1111 steps :
12- - name : Check out backend
13- uses : actions/checkout@v4
14- with :
15- repository : brocoders/nestjs-boilerplate
16- # Use token for private repository
17- # token: ${{ secrets.CI_PAT }}
18- path : backend
19- - run : cd backend && cp env-example-document .env
20- - run : cd backend && sed -i 's/APP_PORT=3000/APP_PORT=3001/g' .env
21- - run : cd backend && sed -i 's/BACKEND_DOMAIN=http:\/\/localhost:3000/BACKEND_DOMAIN=http:\/\/localhost:3001/g' .env
22- - name : Run backend
23- # print output of the command to file and store it as artifact
24- run : cd backend && docker compose -f docker-compose.document.yaml up > ${{ runner.temp }}/backend.log 2>&1 &
25- - run : cd backend && sed -i 's/\r//g' wait-for-it.sh
26- - run : cd backend && ./wait-for-it.sh localhost:3001 -- echo "Backend is up"
12+ - name : Check out backend
13+ uses : actions/checkout@v4
14+ with :
15+ repository : brocoders/nestjs-boilerplate
16+ # Use token for private repository
17+ # token: ${{ secrets.CI_PAT }}
18+ path : backend
19+ - run : cd backend && cp env-example-document .env
20+ - run : cd backend && sed -i 's/APP_PORT=3000/APP_PORT=3001/g' .env
21+ - run : cd backend && sed -i 's/BACKEND_DOMAIN=http:\/\/localhost:3000/BACKEND_DOMAIN=http:\/\/localhost:3001/g' .env
22+ - name : Run backend
23+ # print output of the command to file and store it as artifact
24+ run : cd backend && docker compose -f docker-compose.document.yaml up > ${{ runner.temp }}/backend.log 2>&1 &
25+ - run : cd backend && sed -i 's/\r//g' wait-for-it.sh
26+ - run : cd backend && ./wait-for-it.sh localhost:3001 -- echo "Backend is up"
2727
28- - uses : actions/checkout@v4
29- - uses : actions/setup-node@v4
30- with :
31- node-version : 22
32- - name : Install dependencies
33- run : npm ci
34- - name : Run lint
35- run : npm run lint
36- - name : Install Playwright Browsers
37- run : npx playwright install --with-deps
38- - name : Run Playwright tests
39- run : npx playwright test
40- - uses : actions/upload-artifact@v4
41- if : ${{ !cancelled() }}
42- with :
43- name : playwright-report
44- path : playwright-report/
45- retention-days : 30
46- - uses : actions/upload-artifact@v4
47- if : ${{ !cancelled() }}
48- with :
49- name : backend-log
50- path : ${{ runner.temp }}/backend.log
51- retention-days : 30
28+ - name : Check out frontend
29+ uses : actions/checkout@v4
30+ - uses : actions/setup-node@v4
31+ with :
32+ node-version : 22
33+ - name : Install dependencies
34+ run : npm ci
35+ - name : Run lint
36+ run : npm run lint
37+ - name : Install Playwright Browsers
38+ run : npx playwright install --with-deps
39+ - name : Run Playwright tests
40+ run : npx playwright test
41+ - uses : actions/upload-artifact@v4
42+ if : ${{ !cancelled() }}
43+ with :
44+ name : playwright-report
45+ path : playwright-report/
46+ retention-days : 30
47+ - uses : actions/upload-artifact@v4
48+ if : ${{ !cancelled() }}
49+ with :
50+ name : backend-log
51+ path : ${{ runner.temp }}/backend.log
52+ retention-days : 30
0 commit comments