Skip to content

Commit 8dd5d70

Browse files
authored
Merge pull request #414 from wayofdev/feat/v2.0
2 parents 25e0cc7 + 939b34f commit 8dd5d70

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+3986
-2704
lines changed

.changeset/loud-dolphins-check.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@wayofdev/google-tag-manager': major
3+
'@wayofdev/facebook-pixel': major
4+
'@wayofdev/common-i18n': major
5+
'@wayofdev/storybook': major
6+
'@wayofdev/ui': major
7+
'@wayofdev/docs': major
8+
'@wayofdev/web': major
9+
---
10+
11+
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

.github/actions/playwright-install/action.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

.github/actions/pnpm-install/action.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/labeler.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,4 @@
88
- ./*.md
99

1010
'type: maintenance':
11-
- .dependabot/*
1211
- .github/**/*
13-
- app/tests/**/*
14-
- tests/**/*
Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,18 @@
33
# paths that are modified in the pull request.
44
#
55
# To use this workflow, you will need to set up a .github/labeler.yml
6-
# file with configuration. For more information, see:
6+
# file with configuration. For more information, see:
77
# https://github.com/actions/labeler/blob/master/README.md
88

99
on: # yamllint disable-line rule:truthy
1010
pull_request:
11-
merge_group:
1211

1312
name: 🏷️ Add labels
1413

1514
jobs:
1615
label:
17-
runs-on: ubuntu-latest
18-
steps:
19-
- name: 🏷️ Apply labels
20-
uses: actions/labeler@v4
21-
with:
22-
repo-token: '${{ secrets.GITHUB_TOKEN }}'
16+
uses: wayofdev/gh-actions/.github/workflows/apply-labels.yml@master
17+
with:
18+
os: ubuntu-latest
19+
secrets:
20+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci-apps-docs.yml

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
11
---
22
on: # yamllint disable-line rule:truthy
3-
push:
4-
branches:
5-
- master
6-
- develop
7-
# Only consider those paths to trigger the action
8-
paths:
9-
- 'apps/docs/**'
10-
- 'packages/**'
11-
- 'package.json'
12-
- 'pnpm*'
13-
- '.github/**'
14-
- 'tsconfig.base.json'
15-
163
pull_request:
174
types:
185
- opened
@@ -35,23 +22,34 @@ jobs:
3522
strategy:
3623
fail-fast: true
3724
matrix:
38-
os: ['ubuntu-22.04']
25+
os: ['ubuntu-latest']
3926
node: ['18']
27+
env:
28+
TURBO_API: 'http://127.0.0.1:9080'
29+
TURBO_TEAM: 'next-starter-tpl'
30+
TURBO_TOKEN: 'local_server_turbo_relaxed_token'
4031

4132
steps:
4233
- name: 📦 Check out the codebase
4334
uses: actions/checkout@v3
44-
with:
45-
fetch-depth: 0
4635

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

42+
- name: 🚀 Setup TurboRepo local server
43+
uses: felixmosh/turborepo-gh-artifacts@v2
44+
with:
45+
repo-token: ${{ secrets.GITHUB_TOKEN }}
46+
server-token: ${{ env.TURBO_TOKEN }}
47+
5348
- name: 📥 Monorepo install
54-
uses: ./.github/actions/pnpm-install
49+
uses: wayofdev/gh-actions/actions/pnpm-install@master
50+
with:
51+
enable-corepack: true
52+
cache-node-modules: true
5553

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

6864
- name: 📝 Typecheck
69-
working-directory: apps/web
65+
working-directory: apps/docs
7066
run: |
7167
pnpm lint:types
7268
7369
- name: 🚨 Linter
74-
working-directory: apps/web
70+
working-directory: apps/docs
7571
run: |
7672
pnpm lint
7773
7874
- name: 🏗 Build docs-app
79-
working-directory: apps/web
75+
working-directory: apps/docs
8076
run: |
8177
pnpm --filter=docs build

.github/workflows/ci-apps-web.yml

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
11
---
22
on: # yamllint disable-line rule:truthy
3-
merge_group:
4-
push:
5-
branches:
6-
- master
7-
- develop
8-
# Only consider those paths to trigger the action
9-
paths:
10-
- 'apps/web/**'
11-
- 'packages/**'
12-
- 'package.json'
13-
- 'pnpm*'
14-
- '.github/**'
15-
- 'tsconfig.base.json'
16-
173
pull_request:
184
types:
195
- opened
@@ -36,23 +22,34 @@ jobs:
3622
strategy:
3723
fail-fast: true
3824
matrix:
39-
os: ['ubuntu-22.04']
25+
os: ['ubuntu-latest']
4026
node: ['18']
27+
env:
28+
TURBO_API: 'http://127.0.0.1:9080'
29+
TURBO_TEAM: 'next-starter-tpl'
30+
TURBO_TOKEN: 'local_server_turbo_relaxed_token'
4131

4232
steps:
4333
- name: 📦 Check out the codebase
4434
uses: actions/checkout@v3
45-
with:
46-
fetch-depth: 0
4735

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

42+
- name: 🚀 Setup TurboRepo local server
43+
uses: felixmosh/turborepo-gh-artifacts@v2
44+
with:
45+
repo-token: ${{ secrets.GITHUB_TOKEN }}
46+
server-token: ${{ env.TURBO_TOKEN }}
47+
5448
- name: 📥 Monorepo install
55-
uses: ./.github/actions/pnpm-install
49+
uses: wayofdev/gh-actions/actions/pnpm-install@master
50+
with:
51+
enable-corepack: true
52+
cache-node-modules: true
5653

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

6964
- name: 📝 Typecheck
7065
working-directory: apps/web
@@ -86,6 +81,9 @@ jobs:
8681
run: |
8782
pnpm --filter=web build
8883
env:
84+
NEXTAUTH_URL: http://localhost:3000
85+
NEXTAUTH_SECRET: secret-string-only-for-ci
86+
APP_CACHE_DSN: ''
8987
# Speed up build: they are linted in a previous step
9088
NEXT_IGNORE_ESLINT: true
9189
# Speed up build: they are type-checked in a previous step

.github/workflows/ci-packages.yml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
11
---
22
on: # yamllint disable-line rule:truthy
3-
merge_group:
4-
push:
5-
branches:
6-
- master
7-
- develop
8-
# Only consider those paths to trigger the action
9-
paths:
10-
- 'packages/**'
11-
- 'package.json'
12-
- 'pnpm*'
13-
- '.github/**'
14-
- 'tsconfig.base.json'
15-
163
pull_request:
174
types:
185
- opened
@@ -34,13 +21,18 @@ jobs:
3421
strategy:
3522
fail-fast: true
3623
matrix:
37-
os: ['ubuntu-22.04']
24+
os: ['ubuntu-latest']
3825
node: ['18']
26+
env:
27+
TURBO_API: 'http://127.0.0.1:9080'
28+
TURBO_TEAM: 'next-starter-tpl'
29+
TURBO_TOKEN: 'local_server_turbo_relaxed_token'
3930

4031
steps:
4132
- name: 📦 Check out the codebase
4233
uses: actions/checkout@v3
4334
with:
35+
# We need to fetch all the history for the "changed files" feature to work
4436
fetch-depth: 0
4537

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

44+
- name: 🚀 Setup TurboRepo local server
45+
uses: felixmosh/turborepo-gh-artifacts@v2
46+
with:
47+
repo-token: ${{ secrets.GITHUB_TOKEN }}
48+
server-token: ${{ env.TURBO_TOKEN }}
49+
5250
- name: 📥 Monorepo install
53-
uses: ./.github/actions/pnpm-install
51+
uses: wayofdev/gh-actions/actions/pnpm-install@master
52+
with:
53+
enable-corepack: true
54+
cache-node-modules: true
5455

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

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

0 commit comments

Comments
 (0)