Request to headless Chrome #7
Workflow file for this run
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: CI | |
on: | |
push: | |
pull_request: | |
types: [ opened, reopened, synchronize ] | |
workflow_dispatch: | |
schedule: | |
- cron: '0 */1 * * *' | |
env: | |
GITHUB_ID: ${{secrets.GITHUB_ID}} | |
GITHUB_SECRET: ${{secrets.GITHUB_SECRET}} | |
NEXTAUTH_SECRET: ${{secrets.NEXTAUTH_SECRET}} | |
DATABASE_URL: ${{secrets.DATABASE_URL}} | |
jobs: | |
# This job will build the app and run the tests on the CI server (Github) | |
local: | |
name: Local build, test and deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install npm | |
run: npm install | |
# https://nextjs.org/docs/pages/api-reference/next-cli#build | |
- name: Create production build | |
run: npm run build | |
# https://nextjs.org/docs/pages/api-reference/next-cli#production | |
- name: Start production build on localhost | |
run: | | |
npm run start & | |
sleep 5 | |
- name: Install npm for e2e | |
run: | | |
cd e2e | |
npm install | |
- name: Run WDIO tests against localhost | |
run: | | |
cd e2e | |
npm run wdio-github-local | |
# run: | |
# name: Run | |
# runs-on: ubuntu-latest | |
# | |
# steps: | |
# - name: Install Chrome | |
# uses: browser-actions/setup-chrome@v1 | |
# | |
# - name: Checkout repository | |
# uses: actions/checkout@v4 | |
# | |
# - name: Setup Node.js | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: 18 | |
# | |
# - name: Install npm for app | |
# run: npm install | |
# | |
# - name: Install npm for e2e | |
# run: | | |
# cd e2e | |
# npm install | |
# | |
# - name: Run tests | |
# run: | | |
# cd e2e | |
# npm run wdio-github | |
# env: | |
# VERCEL_URL: ${{ vars.VERCEL_URL }} |