Skip to content

Commit

Permalink
Move cypress to separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbieTheWagner committed Mar 2, 2024
1 parent 7d623c3 commit 9ddafeb
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 45 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Cypress Tests

on:
push:
branches:
- master
pull_request: {}

jobs:
test-integration:
name: Run Integration Chrome Tests
runs-on: ubuntu-latest

steps:
- name: Checkout Repo
uses: actions/checkout@v4

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

- uses: pnpm/action-setup@v3
with:
version: 8

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('examples/basic-pnpm/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies and setup Cypress
uses: cypress-io/github-action@v6
with:
browser: chrome
build: pnpm build
start: pnpm test:cy:start-server
wait-on: 'http://127.0.0.1:9002'
wait-on-timeout: 120
50 changes: 5 additions & 45 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: Lint & Test

on:
push:
Expand All @@ -15,27 +15,8 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v4

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

- uses: pnpm/action-setup@v3
with:
version: 8

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

# Install project dependencies
- name: Install dependencies and run linting
Expand All @@ -49,27 +30,8 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v4

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

- uses: pnpm/action-setup@v3
with:
version: 8

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

- name: Install Dependencies
run: pnpm install
Expand Down Expand Up @@ -119,8 +81,6 @@ jobs:
browser: chrome
build: pnpm build
start: pnpm test:cy:start-server
wait-on: 'http://127.0.0.1:9002'
wait-on-timeout: 120

automerge:
needs: [test-unit, test-integration]
Expand Down

0 comments on commit 9ddafeb

Please sign in to comment.