Skip to content

Commit

Permalink
Merge pull request #414 from wayofdev/feat/v2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lotyp authored Jul 17, 2023
2 parents 25e0cc7 + 939b34f commit 8dd5d70
Show file tree
Hide file tree
Showing 57 changed files with 3,986 additions and 2,704 deletions.
11 changes: 11 additions & 0 deletions .changeset/loud-dolphins-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@wayofdev/google-tag-manager': major
'@wayofdev/facebook-pixel': major
'@wayofdev/common-i18n': major
'@wayofdev/storybook': major
'@wayofdev/ui': major
'@wayofdev/docs': major
'@wayofdev/web': major
---

feat: update packages to use esm instead of commonjs, improved github actions, e2e tests are now working locally trough docker and also in ci, update third-party deps
55 changes: 0 additions & 55 deletions .github/actions/playwright-install/action.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/actions/pnpm-install/action.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@
- ./*.md

'type: maintenance':
- .dependabot/*
- .github/**/*
- app/tests/**/*
- tests/**/*
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
# paths that are modified in the pull request.
#
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# file with configuration. For more information, see:
# https://github.com/actions/labeler/blob/master/README.md

on: # yamllint disable-line rule:truthy
pull_request:
merge_group:

name: 🏷️ Add labels

jobs:
label:
runs-on: ubuntu-latest
steps:
- name: 🏷️ Apply labels
uses: actions/labeler@v4
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
uses: wayofdev/gh-actions/.github/workflows/apply-labels.yml@master
with:
os: ubuntu-latest
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
42 changes: 19 additions & 23 deletions .github/workflows/ci-apps-docs.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
---
on: # yamllint disable-line rule:truthy
push:
branches:
- master
- develop
# Only consider those paths to trigger the action
paths:
- 'apps/docs/**'
- 'packages/**'
- 'package.json'
- 'pnpm*'
- '.github/**'
- 'tsconfig.base.json'

pull_request:
types:
- opened
Expand All @@ -35,23 +22,34 @@ jobs:
strategy:
fail-fast: true
matrix:
os: ['ubuntu-22.04']
os: ['ubuntu-latest']
node: ['18']
env:
TURBO_API: 'http://127.0.0.1:9080'
TURBO_TEAM: 'next-starter-tpl'
TURBO_TOKEN: 'local_server_turbo_relaxed_token'

steps:
- name: 📦 Check out the codebase
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: ⚙️ Setup node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
registry-url: 'https://registry.npmjs.org/'

- name: 🚀 Setup TurboRepo local server
uses: felixmosh/turborepo-gh-artifacts@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: ${{ env.TURBO_TOKEN }}

- name: 📥 Monorepo install
uses: ./.github/actions/pnpm-install
uses: wayofdev/gh-actions/actions/pnpm-install@master
with:
enable-corepack: true
cache-node-modules: true

# see https://github.com/vercel/next.js/pull/27362
- name: ♻️ Restore "docs" app build from cache
Expand All @@ -61,21 +59,19 @@ jobs:
${{ github.workspace }}/apps/docs/.next/cache
${{ github.workspace }}/.cache
${{ github.workspace }}/**/tsconfig.tsbuildinfo
key: ${{ runner.os }}-web-${{ hashFiles('pnpm*.yaml') }}-${{ hashFiles('apps/docs/src/**.[jt]sx?', 'apps/docs/src/**.json') }}
restore-keys: |
${{ runner.os }}-web-${{ hashFiles('pnpm*.yaml') }}-
key: docs-cache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}

- name: 📝 Typecheck
working-directory: apps/web
working-directory: apps/docs
run: |
pnpm lint:types
- name: 🚨 Linter
working-directory: apps/web
working-directory: apps/docs
run: |
pnpm lint
- name: 🏗 Build docs-app
working-directory: apps/web
working-directory: apps/docs
run: |
pnpm --filter=docs build
40 changes: 19 additions & 21 deletions .github/workflows/ci-apps-web.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
---
on: # yamllint disable-line rule:truthy
merge_group:
push:
branches:
- master
- develop
# Only consider those paths to trigger the action
paths:
- 'apps/web/**'
- 'packages/**'
- 'package.json'
- 'pnpm*'
- '.github/**'
- 'tsconfig.base.json'

pull_request:
types:
- opened
Expand All @@ -36,23 +22,34 @@ jobs:
strategy:
fail-fast: true
matrix:
os: ['ubuntu-22.04']
os: ['ubuntu-latest']
node: ['18']
env:
TURBO_API: 'http://127.0.0.1:9080'
TURBO_TEAM: 'next-starter-tpl'
TURBO_TOKEN: 'local_server_turbo_relaxed_token'

steps:
- name: 📦 Check out the codebase
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: ⚙️ Setup node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
registry-url: 'https://registry.npmjs.org/'

- name: 🚀 Setup TurboRepo local server
uses: felixmosh/turborepo-gh-artifacts@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: ${{ env.TURBO_TOKEN }}

- name: 📥 Monorepo install
uses: ./.github/actions/pnpm-install
uses: wayofdev/gh-actions/actions/pnpm-install@master
with:
enable-corepack: true
cache-node-modules: true

# see https://github.com/vercel/next.js/pull/27362
- name: ♻️ Restore "web" app build from cache
Expand All @@ -62,9 +59,7 @@ jobs:
${{ github.workspace }}/apps/web/.next/cache
${{ github.workspace }}/.cache
${{ github.workspace }}/**/tsconfig.tsbuildinfo
key: ${{ runner.os }}-web-${{ hashFiles('pnpm*.yaml') }}-${{ hashFiles('apps/web/src/**.[jt]sx?', 'apps/web/src/**.json') }}
restore-keys: |
${{ runner.os }}-web-${{ hashFiles('pnpm*.yaml') }}-
key: web-cache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}

- name: 📝 Typecheck
working-directory: apps/web
Expand All @@ -86,6 +81,9 @@ jobs:
run: |
pnpm --filter=web build
env:
NEXTAUTH_URL: http://localhost:3000
NEXTAUTH_SECRET: secret-string-only-for-ci
APP_CACHE_DSN: ''
# Speed up build: they are linted in a previous step
NEXT_IGNORE_ESLINT: true
# Speed up build: they are type-checked in a previous step
Expand Down
37 changes: 18 additions & 19 deletions .github/workflows/ci-packages.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
---
on: # yamllint disable-line rule:truthy
merge_group:
push:
branches:
- master
- develop
# Only consider those paths to trigger the action
paths:
- 'packages/**'
- 'package.json'
- 'pnpm*'
- '.github/**'
- 'tsconfig.base.json'

pull_request:
types:
- opened
Expand All @@ -34,13 +21,18 @@ jobs:
strategy:
fail-fast: true
matrix:
os: ['ubuntu-22.04']
os: ['ubuntu-latest']
node: ['18']
env:
TURBO_API: 'http://127.0.0.1:9080'
TURBO_TEAM: 'next-starter-tpl'
TURBO_TOKEN: 'local_server_turbo_relaxed_token'

steps:
- name: 📦 Check out the codebase
uses: actions/checkout@v3
with:
# We need to fetch all the history for the "changed files" feature to work
fetch-depth: 0

- name: ⚙️ Setup node ${{ matrix.node }}
Expand All @@ -49,19 +41,26 @@ jobs:
node-version: ${{ matrix.node }}
registry-url: 'https://registry.npmjs.org/'

- name: 🚀 Setup TurboRepo local server
uses: felixmosh/turborepo-gh-artifacts@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: ${{ env.TURBO_TOKEN }}

- name: 📥 Monorepo install
uses: ./.github/actions/pnpm-install
uses: wayofdev/gh-actions/actions/pnpm-install@master
with:
enable-corepack: true
cache-node-modules: true

# see https://github.com/vercel/next.js/pull/27362
- name: ♻️ Restore packages cache
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.cache
${{ github.workspace }}/**/tsconfig.tsbuildinfo
key: ${{ runner.os }}-packages-cache-${{ hashFiles('**/pnpm*.yaml') }}-${{ hashFiles('packages/**.[jt]sx?', 'packages/**.json') }}
restore-keys: |
${{ runner.os }}-packages-cache-${{ hashFiles('**/pnpm*.yaml') }}-
key: packages-cache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}

# Typecheck packages that have changed + packages and apps that depends on them (--from & --since)
# That allows to see if we're introducing "surface" regressions (just the types)
Expand Down
Loading

3 comments on commit 8dd5d70

@vercel
Copy link

@vercel vercel bot commented on 8dd5d70 Jul 17, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

next-starter-tpl-storybook – ./apps/storybook

next-starter-tpl-storybook.vercel.app
next-starter-tpl-storybook-wayofdev.vercel.app
next-starter-tpl-storybook-git-master-wayofdev.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 8dd5d70 Jul 17, 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 8dd5d70 Jul 17, 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.