Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tooling: add monorepo and update playwright tests #196

Merged
merged 7 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,7 @@ name: E2E - Test
on: push

jobs:
setup:
runs-on: ubuntu-latest
outputs:
preview_url: ${{ steps.waitForVercelPreviewDeployment.outputs.url }}
steps:
- name: Wait for Vercel preview deployment to be ready
uses: patrickedqvist/wait-for-vercel-preview@v1.2.0
id: waitForVercelPreviewDeployment
with:
token: ${{ secrets.GITHUB_TOKEN }}
max_timeout: 600
test:
needs: setup
name: Run Playwright tests
timeout-minutes: 5
runs-on: ubuntu-latest
Expand All @@ -24,10 +12,8 @@ jobs:
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14"
node-version: "18"
- run: yarn
- run: npx playwright install --with-deps
- name: Run tests
run: yarn test:e2e
env:
BASE_URL: ${{ needs.setup.outputs.preview_url }}
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-

- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 14.x
node-version: 18.x

- name: yarn install
run: yarn
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ dist/
.yalc/
yalc.lock
.idea/
.turbo
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.17
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"arrowParens": "avoid",
"printWidth": 100
}
9 changes: 7 additions & 2 deletions examples/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start"
},
"dependencies": {
"next": "^12.1.6",
"next-themes": "beta",
"next-themes": "*",
"react": "^18.1.0",
"react-dom": "^18.1.0"
}
}
}
164 changes: 0 additions & 164 deletions examples/example/yarn.lock

This file was deleted.

4 changes: 2 additions & 2 deletions examples/tailwind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"next": "^12.1.6",
"next-themes": "latest",
"next-themes": "*",
"react": "^18.1.0",
"react-dom": "^18.1.0"
},
Expand All @@ -18,4 +18,4 @@
"tailwindcss": "^2.0.1"
},
"license": "MIT"
}
}
2 changes: 1 addition & 1 deletion examples/tailwind/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import '../styles.css'

function MyApp({ Component, pageProps }) {
return (
<ThemeProvider forcedTheme={Component.theme || undefined} attribute="class">
<ThemeProvider forcedTheme={Component.theme || undefined} attribute='class'>
<Component {...pageProps} />
</ThemeProvider>
)
Expand Down
Loading