File tree 1 file changed +46
-0
lines changed
1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Name of the GitHub Actions workflow
2
+ name : Playwright Github Actions
3
+
4
+ # Define when to trigger this workflow
5
+ on :
6
+ push :
7
+ branches :
8
+ - main
9
+ pull_request :
10
+ branches :
11
+ - main
12
+
13
+ # Define the jobs to run in this workflow
14
+ jobs :
15
+ # Define a job named 'build'
16
+ build :
17
+ # Specify the operating system for this job
18
+ runs-on : ubuntu-latest
19
+
20
+ # Define the steps to execute in this job
21
+ steps :
22
+ # Step to checkout the source code from the repository
23
+ - name : Checkout code
24
+ uses : actions/checkout@v2
25
+
26
+ # Step to set up the Node.js version
27
+ - name : Use Node.js 20.5.1-bookworm-slim
28
+ uses : actions/setup-node@v2
29
+ with :
30
+ node-version : ' 20.5.1-bookworm-slim'
31
+
32
+ # Step to install Node.js dependencies
33
+ - name : Install dependencies
34
+ run : npm ci
35
+
36
+ # Step to install Chrome browser for Playwright
37
+ - name : Install Chrome browser for Playwright
38
+ run : npx playwright install chrome
39
+
40
+ # Step to run tests
41
+ - name : Run tests
42
+ run : npm run test:serial
43
+
44
+ # Step to run Docker container with specific environment variable and name
45
+ - name : Run Docker container
46
+ run : docker run -e npm_config_ENV=qa --name playContainer playtest
You can’t perform that action at this time.
0 commit comments