Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
Co-Authored-By: Damien Simonin Feugas <damien.feugas@gmail.com>
Co-Authored-By: Timo Lins <me@timo.sh>
  • Loading branch information
3 people committed Dec 7, 2023
0 parents commit 8bff0ac
Show file tree
Hide file tree
Showing 127 changed files with 36,326 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
root: true,
extends: [
require.resolve('@vercel/style-guide/eslint/browser'),
require.resolve('@vercel/style-guide/eslint/typescript'),
require.resolve('@vercel/style-guide/eslint/jest'),
],
env: {
jest: true,
},
parserOptions: {
project: './tsconfig.json',
},
ignorePatterns: ['*.config.js', 'dist/'],
};
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
Binary file added .github/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions .github/composite-actions/install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'Install'
description: 'Sets up Node.js and runs install'
runs:
using: composite
steps:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'

- name: Install pnpm with corepack
shell: bash
run: corepack enable && pnpm --version

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

- name: Restore pnpm global cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
${{ runner.os }}-pnpm-store-
- name: Install dependencies
shell: bash
run: pnpm install
22 changes: 22 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### 📓 What's in there?

<!--
✍️ Please explain what this PR contains and why.
If not done automatically, refer to any issues, PRs or stories.
-->

### 🧪 How to test?

<!--
✍️ Help your reviewer testing your feature by providing simple instructions:
- do X
> expect A
- do Y
> expect B. It used to be C
-->

<!--
### ❗ Notes to reviewers
✍️ You can provide more technical/design details about your change
-->
55 changes: 55 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: ci
on:
pull_request:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
typescript:
name: typescript
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: checkout
uses: actions/checkout@v3
- name: Install
uses: ./.github/composite-actions/install
- name: lint
run: pnpm -r lint
- name: type-check
run: pnpm -r type-check
- name: prettier
run: pnpm prettier -c .
- name: build
run: pnpm -r build
- name: test
run: pnpm -r test

playwright:
name: playwright
runs-on: ubuntu-latest
if: false
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
test:
- 'test:e2e:production'
- 'test:e2e:development'
steps:
- name: checkout
uses: actions/checkout@v3
- name: Install
uses: ./.github/composite-actions/install
- name: get playwright version
id: pw
run: echo "version=$(cat apps/nextjs/package.json | jq -r '.devDependencies."@playwright/test"')" >> $GITHUB_OUTPUT
- name: install playwright
run: pnpx playwright@${{ steps.pw.outputs.version }} install
- name: test
run: pnpm -r ${{ matrix.test }}
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: Install
uses: ./.github/composite-actions/install
- name: lint
run: pnpm -r lint
- name: type-check
run: pnpm -r type-check
- name: prettier
run: pnpm prettier -c .
- name: build
run: pnpm -r build
- run: pnpm --filter @vercel/speed-insights publish --tag beta --no-git-checks
if: github.event.release.prerelease == true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }}
- run: pnpm --filter @vercel/speed-insights publish --no-git-checks
if: github.event.release.prerelease == false
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
.DS_Store
.vscode
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm lint-staged
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.16.1
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.next/
dist/
.github/
.nuxt/
.svelte-kit/
.vercel/
Loading

2 comments on commit 8bff0ac

@vercel
Copy link

@vercel vercel bot commented on 8bff0ac Dec 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 8bff0ac Dec 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.