Skip to content

Commit

Permalink
more yoop
Browse files Browse the repository at this point in the history
  • Loading branch information
subject026 committed Oct 26, 2023
1 parent 415a0b2 commit 9751709
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 18 deletions.
82 changes: 64 additions & 18 deletions .github/workflows/E2E.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,93 @@ on:
branches: [development]

jobs:
test:
timeout-minutes: 60
linting:
name: ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
run: yarn install

- name: Install Dependencies
run: pnpm install

- name: Lint
run: pnpm site run lint

build:
name: Next Build
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8.8.0

- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Install Dependencies
run: pnpm install

- uses: actions/cache@v3
name: Setup pnpm cache
- name: Run build
run: pnpm site run build

test:
name: Playwright Testss
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
version: 8.8.0

- name: Install Dependencies
run: pnpm install

- name: Build Site
- name: Run build
run: pnpm site run build

# - name: Get pnpm store directory
# id: pnpm-cache
# shell: bash
# run: |
# echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

# - uses: actions/cache@v3
# name: Setup pnpm cache
# with:
# path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-pnpm-store-

- name: Install Playwright Browsers
run: pnpm playwright install --with-deps
run: pnpm site playwright install --with-deps

- name: Run Playwright tests
run: pnpm exec playwright test
run: pnpm site playwright test

- uses: actions/upload-artifact@v3
if: always()
Expand Down
1 change: 1 addition & 0 deletions apps/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
"playwright": "playwright",
"playwright:test": "playwright test"
},
"dependencies": {
Expand Down

0 comments on commit 9751709

Please sign in to comment.