You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a a file in this folder structure .github/workflows/ci.yml in the root of your directory
Paste in the following configuration
name: Node.js CIenv:
SCREENER_API_KEY: ${{ secrets.SCREENER_API_KEY }}SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}on:
push:
branches: [ main ]pull_request:
branches: [ main ]jobs:
build:
runs-on: ubuntu-lateststrategy:
matrix:
node-version: [14.x]steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}uses: actions/setup-node@v1with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies 📦#Using npm ci is generally faster than running npm installrun: | cd my-react-app npm ci
- name: Build the app 🏗run: | cd my-react-app npm run build
- name: Run component tests 🔸run: | cd my-react-app npm run test# If we had more time, at this point we can actually deploy our app# to a staging server and then run functional tests
- name: Start the app 📤run: | cd my-react-app npm start & npx wait-on --timeout 60000
- name: Run functional UI tests 🖥run: | cd my-react-app npm run cy:ci
- name: Run visual tests 👁run: | cd my-react-app echo $SAUCE_USERNAME npm run test:visual