Skip to content

Commit

Permalink
using actions
Browse files Browse the repository at this point in the history
  • Loading branch information
charliewilco committed Feb 19, 2024
1 parent d78edd5 commit 462f811
Show file tree
Hide file tree
Showing 20 changed files with 863 additions and 2,630 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# Update the VARIANT arg in docker-compose.yml to pick a Node version: 10, 12, 14
ARG VARIANT=12
ARG VARIANT=20
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:dev-${VARIANT}

# Install MongoDB command line tools
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
},
"extensions": ["mongodb.mongodb-vscode"],
"forwardPorts": [3000, 27017],
"postCreateCommand": "npm install",
"postCreateCommand": "pnpm install",
"remoteUser": "node"
}
2 changes: 1 addition & 1 deletion .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
dockerfile: Dockerfile
args:
# [Choice] Node.js version: 14, 12, 10
VARIANT: 16
VARIANT: 20
# On Linux, you may need to update USER_UID and USER_GID below if not your local UID is not 1000.
USER_UID: 1000
USER_GID: 1000
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
NEXT_TELEMETRY_DISABLED: 1
strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [18.x, 20.x]
services:
mongodb:
image: mongo:4.4
Expand All @@ -18,17 +18,21 @@ jobs:
- uses: actions/cache@v3
with:
path: ${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install deps
run: yarn install
run: pnpm install
- name: Install Playwright
run: yarn deps
run: pnpm deps
- name: Build Project for Testing
run: yarn build
- name: Run Playwright
run: yarn test
run: pnpm test
15 changes: 15 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://biomejs.dev/schemas/1.5.0/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"style": {
"useConst": "off"
}
}
}
}
1 change: 0 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module.exports = {
reactStrictMode: true,
swcMinify: true,
experimental: {
appDir: true,
serverComponentsExternalPackages: ["mongoose"],
},
};
31 changes: 9 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,17 @@
"deps": "playwright install --with-deps"
},
"dependencies": {
"immer": "^10.0.1",
"mongoose": "^7.0.2",
"next": "^13.3.1",
"mongoose": "^8.1.3",
"next": "^14.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"swr": "^2.0.2"
"react-dom": "^18.2.0"
},
"devDependencies": {
"@playwright/test": "^1.30.0",
"@types/node": "^18.11.18",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"eslint": "^8.32.0",
"eslint-config-next": "^13.1.6",
"prettier": "^2.8.3",
"typescript": "^5.0.4"
},
"eslintConfig": {
"extends": "next/core-web-vitals"
},
"prettier": {
"printWidth": 95,
"useTabs": true,
"bracketSpacing": true,
"bracketSameLine": true
"@biomejs/biome": "^1.5.3",
"@playwright/test": "^1.41.2",
"@types/node": "^20.11.19",
"@types/react": "^18.2.56",
"@types/react-dom": "^18.2.19",
"typescript": "^5.3.3"
}
}

0 comments on commit 462f811

Please sign in to comment.