Skip to content

Commit

Permalink
ci: create cypress e2e workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
robsonnatanael committed Jan 18, 2024
1 parent 835bc7a commit 876480a
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/run-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Cypress Tests

on: push

jobs:
cypress-run:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20

- name: Install PNPM
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Cypress run
uses: cypress-io/github-action@v6
env:
APP_URL: "http://localhost:3000"
NEXT_PUBLIC_API_BASE_URL: "https://ignite-devstore-api-blond.vercel.app/"
with:
build: npm run build
start: npm start
6 changes: 6 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
eslint: {
ignoreDuringBuilds: true,
},
typescript: {
ignoreBuildErrors: true,
},
images: {
domains: ['github.com'],
},
Expand Down

0 comments on commit 876480a

Please sign in to comment.