Update Github Action workflow #125 #623
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Github Actions | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
TEST_BASE_URL: http://localhost:8080 | |
SELENIUM_HOST: http://selenium:4444/wd/hub | |
services: | |
selenium: | |
image: selenium/standalone-chrome:latest # Or use selenium/standalone-firefox:latest for Firefox | |
ports: | |
- 4444:4444 # Map Selenium server port | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
- name: Run Selenium Standalone server | |
run: | | |
wget https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.1.0/selenium-server-4.1.2.jar | |
java -jar selenium-server-4.1.2.jar -role node -hub http://localhost:4444 | |
- name: Install | |
run: yarn install | |
- name: Configure nightwatch.conf.js for Github | |
run: node webship-init -ci github -os linux -b chrome | |
- name: Start virtual server | |
run: | | |
export NODE_OPTIONS=--openssl-legacy-provider | |
yarn start & | |
- name: Test | |
run: yarn test |