Skip to content

Instantly share code, notes, and snippets.

@tarasowski
Created March 5, 2024 11:51
Show Gist options
  • Save tarasowski/b900a4f19c42bae416afcfe5604c6040 to your computer and use it in GitHub Desktop.
Save tarasowski/b900a4f19c42bae416afcfe5604c6040 to your computer and use it in GitHub Desktop.
React app test pipeline
name: Selenium Tests
on:
push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install Dependencies
run: |
npm install
npm install selenium-webdriver chromedriver mocha chai
- name: Build React App
run: npm run build
- name: Start Node.js Server
run: npm start &
- name: Wait for Server to Start
run: sleep 10
- name: Run Selenium Tests
run: npm test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment