-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(turbo): add turbo config (#4006)
Signed-off-by: Alexandre Philibeaux <[email protected]>
- Loading branch information
Showing
26 changed files
with
222 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
"@ultraviolet/illustrations": patch | ||
"@ultraviolet/icons": patch | ||
"@ultraviolet/form": patch | ||
"@ultraviolet/plus": patch | ||
"@ultraviolet/ui": patch | ||
"@ultraviolet/themes": patch | ||
--- | ||
|
||
Add turborepo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,20 +11,26 @@ on: | |
jobs: | ||
typecheck: | ||
runs-on: ubuntu-22.04 | ||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_REMOTE_ONLY: true | ||
steps: | ||
- uses: actions/checkout@v4 # v4.1.4 | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/[email protected] | ||
- name: Use Node.js | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 20 | ||
cache: "pnpm" | ||
- run: pnpm install | ||
- run: pnpm run build | ||
- run: pnpm install | ||
- run: pnpm typecheck | ||
- run: | | ||
pnpm install | ||
pnpm typecheck | ||
lint: | ||
runs-on: ubuntu-22.04 | ||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_REMOTE_ONLY: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/[email protected] | ||
|
@@ -33,12 +39,16 @@ jobs: | |
with: | ||
node-version: 20 | ||
cache: "pnpm" | ||
- run: pnpm install | ||
- run: pnpm run build | ||
- run: pnpm install | ||
- run: pnpm run lint | ||
- run: | | ||
pnpm install | ||
pnpm build | ||
pnpm run lint | ||
format: | ||
runs-on: ubuntu-22.04 | ||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_REMOTE_ONLY: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/[email protected] | ||
|
@@ -47,30 +57,32 @@ jobs: | |
with: | ||
node-version: 20 | ||
cache: "pnpm" | ||
- run: pnpm install | ||
- run: pnpm run build | ||
- run: pnpm install | ||
- run: pnpm run format:ci | ||
- run: | | ||
pnpm install | ||
pnpm run format:ci | ||
test: | ||
runs-on: ubuntu-22.04 | ||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_REMOTE_ONLY: true | ||
needs: [lint, typecheck, format] | ||
strategy: | ||
matrix: | ||
node: ["20"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: "0" | ||
fetch-depth: 10 | ||
- uses: pnpm/[email protected] | ||
- name: Use Node.js | ||
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: "pnpm" | ||
- run: pnpm install | ||
- run: pnpm run build | ||
- run: pnpm install | ||
- run: pnpm run test:unit:coverage | ||
- run: | | ||
pnpm install | ||
pnpm run test:unit:coverage | ||
- uses: codecov/[email protected] | ||
with: | ||
# files: packages/**/coverage/cobertura-coverage.xmls | ||
|
@@ -98,6 +110,9 @@ jobs: | |
matrix: | ||
node: ["20"] | ||
runs-on: ubuntu-22.04 | ||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_REMOTE_ONLY: true | ||
needs: [lint, typecheck, format] | ||
steps: | ||
- uses: actions/checkout@v4 # v4.1.4 | ||
|
@@ -106,22 +121,6 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- run: pnpm install | ||
- run: pnpm run build | ||
build-examples: # This will build all projects in the examples folder, it assures that all examples are working | ||
strategy: | ||
matrix: | ||
node: ["20"] | ||
runs-on: ubuntu-22.04 | ||
needs: [lint, test, format] | ||
steps: | ||
- uses: actions/checkout@v4 # v4.1.4 | ||
- uses: pnpm/[email protected] | ||
- name: Use Node.js | ||
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- run: pnpm install | ||
- run: pnpm build | ||
- run: pnpm install | ||
- run: pnpm run build:examples | ||
- run: | | ||
pnpm install | ||
pnpm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,8 @@ jobs: | |
IMAGE_NAME: rg.fr-par.scw.cloud/ultraviolet/storybook | ||
DEPLOYMENT_NAME: "storybook" | ||
SCW_DNS: ${{ github.ref_name == 'main' && 'storybook.ultraviolet.scaleway.com' || '' }} | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_REMOTE_ONLY: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Inject slug/short variables | ||
|
@@ -54,6 +56,7 @@ jobs: | |
env: | ||
IMAGE: ${{ env.IMAGE_NAME }}:${{ env.BRANCH_SLUG }} | ||
SOURCE_DATE_EPOCH: 0 | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
with: | ||
push: true | ||
tags: ${{ env.IMAGE }} | ||
|
@@ -79,13 +82,15 @@ jobs: | |
echo "SCW_MIN_SCALE=0" >> $GITHUB_ENV | ||
fi | ||
- name: Set scw_cpu_limit | ||
- name: Set scw_limit | ||
id: set-cpu-limit | ||
run: | | ||
if [[ "${{ env.BRANCH_SLUG }}" == "main" ]]; then | ||
echo "SCW_CPU_LIMIT=560" >> $GITHUB_ENV | ||
echo "SCW_CPU_LIMIT=1120" >> $GITHUB_ENV | ||
echo "SCW_MEMORY_LIMIT=1024" >> $GITHUB_ENV | ||
else | ||
echo "SCW_CPU_LIMIT=140" >> $GITHUB_ENV | ||
echo "SCW_MEMORY_LIMIT=256" >> $GITHUB_ENV | ||
fi | ||
- name: Deploy Serverless Container Scaleway | ||
|
@@ -105,6 +110,7 @@ jobs: | |
scw_cpu_limit: ${{ env.SCW_CPU_LIMIT }} | ||
scw_max_concurrency: ${{ env.SCW_MAX_CONCURRENCY }} | ||
scw_sandbox: "v2" | ||
scw_memory_limit: ${{ env.SCW_MEMORY_LIMIT }} | ||
|
||
- name: Update deployment status | ||
uses: bobheadxi/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,14 +7,14 @@ jobs: | |
check-title: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 # v4.1.4 | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/[email protected] | ||
- name: Use Node.js | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 20 | ||
cache: "pnpm" | ||
- run: pnpm install | ||
- run: pnpm install --prod | ||
- name: Check PR title | ||
env: | ||
TITLE: ${{ github.event.pull_request.title }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,8 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- run: pnpm install | ||
- run: pnpm run build | ||
- run: pnpm run size:packages | ||
- run: | | ||
pnpm install | ||
pnpm run size | ||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"teamid": "team_ultraviolet", | ||
"apiurl": "https://turbopm2juoty-turbo.functions.fnc.fr-par.scw.cloud" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.