File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 1313jobs :
1414 test :
1515 runs-on : ubuntu-latest
16-
16+
1717 steps :
1818 - uses : actions/checkout@v3
1919
20- - name : Install Node.js
20+ - name : Set up Node.js
2121 uses : actions/setup-node@v3
2222 with :
2323 node-version : 18
2424
25- - name : Clean install the project
25+ - name : Install dependencies
2626 run : npm ci
2727
28- - name : Install ChromeDriver
29- run : npm install chromedriver --detect_chromedriver_version
28+ - name : Install matching ChromeDriver
29+ run : |
30+ CHROME_VERSION=$(google-chrome --version | grep -oP '\d+\.\d+\.\d+' | head -1)
31+ CHROME_MAJOR_VERSION=$(echo "$CHROME_VERSION" | cut -d '.' -f 1)
32+ echo "Detected Chrome version: $CHROME_VERSION (major: $CHROME_MAJOR_VERSION)"
33+ npm install chromedriver@$CHROME_MAJOR_VERSION
3034
31- - name : Execute all tests
35+ - name : Run tests
3236 run : npm run test:ci
You can’t perform that action at this time.
0 commit comments