Skip to content

Commit

Permalink
Merge branch 'master' into mhuchet/chore/remove-allyjs
Browse files Browse the repository at this point in the history
  • Loading branch information
jmfrancois committed Nov 5, 2024
2 parents 8cb5fc9 + 89731e8 commit 2ab83f5
Show file tree
Hide file tree
Showing 135 changed files with 4,724 additions and 3,967 deletions.
6 changes: 6 additions & 0 deletions .changeset/unlucky-pandas-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@talend/design-system': patch
'@talend/react-components': patch
---

Upgrade react-is to v18.3.1 and set as dependency (not peerDep) in design-system
19 changes: 0 additions & 19 deletions .github/workflows/before-surge.sh

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/changeset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
Expand All @@ -37,7 +37,7 @@ jobs:

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9 #v1.4.7
uses: changesets/action@3de3850952bec538fde60aac71731376e57b9b57 #v1.4.8
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/clean-demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Delete PR folder in gh-pages
on:
pull_request:
types: [closed]

permissions:
contents: write
pull-requests: write
statuses: write
checks: write
pages: write

jobs:
clean:
runs-on: ubuntu-latest
steps:
- name: Checkout demo branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
with:
path: demo
ref: gh-pages

- name: Delete PR folder
run: |
rm -rf ./demo/${{ github.event.number }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Commit demo for gh-pages
uses: actions-js/push@156f2b10c3aa000c44dbe75ea7018f32ae999772 #v1.4
with:
directory: "./demo"
github_token: ${{ secrets.GITHUB_TOKEN }}
message: "doc: cleanup demo"
branch: gh-pages
84 changes: 84 additions & 0 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Demo CI
on:
push:
branches:
- master

permissions:
contents: write
pull-requests: write
statuses: write
checks: write
pages: write

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
build:
name: Build and test
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2

- name: Use Node.js
uses: ./.github/actions/setup-node

- name: Install
working-directory: ./
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn install --frozen-lockfile

- name: Build Demo
run: yarn test:demo

- name: Checkout demo branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
with:
path: demo
ref: gh-pages

- name: Add demo and commit it
# symlink creation : workaround to be able to use service worker on storybook both in local and via github pages deployment
run: |
echo "Prepare demo folder"
cd demo && git rm -rf --ignore-unmatch ./main && cd ..
mkdir -p ./demo/main
cp ./index.html ./demo/main/
mkdir ./demo/main/cmf
mkdir ./demo/main/containers
mkdir ./demo/main/design-system
mkdir ./demo/main/faceted-search
mkdir ./demo/main/theme
mkdir ./demo/main/storybook-one
cp -R packages/cmf/jsdoc ./demo/main/cmf
cp -R packages/containers/storybook-static/* ./demo/main/containers
cp -R packages/design-docs/storybook-static/* ./demo/main/design-system
cp -R packages/faceted-search/storybook-static/* ./demo/main/faceted-search
cp -R packages/theme/dist/* ./demo/main/theme
cp -R packages/storybook-one/storybook-static/* ./demo/main/storybook-one
echo Size of demo:
du -d 1 -h ./demo/main
cd demo && git add .
- name: Commit demo for gh-pages
uses: actions-js/push@156f2b10c3aa000c44dbe75ea7018f32ae999772 #v1.4
with:
directory: "./demo"
github_token: ${{ secrets.GITHUB_TOKEN }}
message: "doc: update demo"
branch: gh-pages

- name: Deploy to Netlify production
if: github.ref == 'refs/heads/master'
uses: netlify/actions/cli@master
with:
args: deploy --dir=packages/design-docs/storybook-static --prod
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2

- name: Use Node.js
uses: ./.github/actions/setup-node
Expand All @@ -33,7 +33,7 @@ jobs:
git add dependencies-latest.txt
- name: Create Pull Request
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c #v6.1.0
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f #v7.0.5
with:
reviewers: "@Talend/frontend-admins"
commit-message: "chore: upgrade dependencies"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/design-system-component-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
browser: ["chrome", "firefox"]
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2

- name: Use Node.js
uses: ./.github/actions/setup-node

- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 #v4.0.2
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a #v4.1.2
with:
path: ~/.cache/Cypress
key: my-cache-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
Expand All @@ -44,21 +44,21 @@ jobs:
yarn workspace @talend/design-tokens run build:lib:esm
- name: Cypress Component Testing
uses: cypress-io/github-action@1b70233146622b69e789ccdd4f9452adc638d25a #v6.6.1
uses: cypress-io/github-action@0da3c06ed8217b912deea9d8ee69630baed1737e #v6.7.6
with:
install: false
browser: ${{ matrix.browser }}
command: yarn workspace @talend/design-system run test:cy

- name: Cypress screenshots upload
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 #v4.4.3
if: failure()
with:
name: cypress-component-testing-${{ matrix.browser }}-screenshots
path: packages/design-system/cypress/screenshots/**/*

- name: Cypress videos upload
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 #v4.3.3
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 #v4.4.3
if: failure()
with:
name: cypress-component-testing-${{ matrix.browser }}-videos
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
working-directory: ./packages/icons
steps:
- name: Checkout sources
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
with:
# Required when using a PAT for opening the PR
persist-credentials: false
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c #v6.1.0
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f #v7.0.5
with:
commit-message: "chore(icons): from Figma"
title: "chore(icons): from Figma"
Expand Down
124 changes: 59 additions & 65 deletions .github/workflows/pr-demo.yml
Original file line number Diff line number Diff line change
@@ -1,93 +1,87 @@
name: PR demo CI

name: PR Demo CI
on:
pull_request:
push:
branches: [master]

permissions:
contents: read
deployments: read
pull-requests: write # needed to write a comment
contents: write
pull-requests: write
statuses: write
checks: write
pages: write


# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
build:
name: Build demo on PR
runs-on: ubuntu-latest
name: Build demo and deploy it
environment: pull_request_unsafe

steps:
- name: Checkout sources
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2

- name: Use Node.js
uses: ./.github/actions/setup-node

- name: cache for storybook
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 #v4.0.2
with:
path: packages/*/node_modules
key: ${{ runner.os }}-storybook-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-storybook-
- name: Install
run: |
node --version
yarn install --frozen-lockfile
working-directory: ./
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn install --frozen-lockfile

- name: Build Demo
run: yarn test:demo

- name: Run test:demo
run: |
node --version
yarn test:demo
- name: Checkout demo branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2
with:
path: demo
ref: gh-pages

- name: Before surge
- name: Add demo and commit it
# symlink creation : workaround to be able to use service worker on storybook both in local and via github pages deployment
run: |
node --version
yarn global add surge
echo "$(yarn global bin)" >> $GITHUB_PATH
node --version
./.github/workflows/before-surge.sh
env:
STORYBOOK_FIGMA_ACCESS_TOKEN: ${{ secrets.STORYBOOK_FIGMA_ACCESS_TOKEN }}

- name: deploy if master
if: github.ref == 'refs/heads/master'
run: surge --project .static --domain "talend.surge.sh"
env:
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
echo "Prepare demo folder"
cd demo && git rm -rf --ignore-unmatch ${{ github.event.number }} && cd ..
mkdir -p ./demo/${{ github.event.number }}
cp ./index.html ./demo/${{ github.event.number }}/
mkdir ./demo/${{ github.event.number }}/cmf
mkdir ./demo/${{ github.event.number }}/containers
mkdir ./demo/${{ github.event.number }}/design-system
mkdir ./demo/${{ github.event.number }}/faceted-search
mkdir ./demo/${{ github.event.number }}/theme
mkdir ./demo/${{ github.event.number }}/storybook-one
cp -R packages/cmf/jsdoc ./demo/${{ github.event.number }}/cmf
cp -R packages/containers/storybook-static/* ./demo/${{ github.event.number }}/containers
cp -R packages/design-docs/storybook-static/* ./demo/${{ github.event.number }}/design-system
cp -R packages/faceted-search/storybook-static/* ./demo/${{ github.event.number }}/faceted-search
cp -R packages/theme/dist/* ./demo/${{ github.event.number }}/theme
cp -R packages/storybook-one/storybook-static/* ./demo/${{ github.event.number }}/storybook-one
echo Size of demo:
du -d 1 -h ./demo/${{ github.event.number }}
cd demo && git add .
- name: Deploy to Netlify production
if: github.ref == 'refs/heads/master'
uses: netlify/actions/cli@master
- name: Commit demo for gh-pages
uses: actions-js/push@156f2b10c3aa000c44dbe75ea7018f32ae999772 #v1.4
with:
args: deploy --dir=packages/design-docs/storybook-static --prod
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
directory: "./demo"
github_token: ${{ secrets.GITHUB_TOKEN }}
message: "doc: update demo from ${{ github.event.number }}"
branch: gh-pages

- name: deploy if PR
if: github.ref != 'refs/heads/master'
run: |
surge --project .static --domain "${{ github.event.number }}.talend.surge.sh"
env:
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.number }}
body-includes: Storybook for this PR deployed on this

- name: Comment PR
uses: daohoangson/comment-on-github@v2
if: ${{github.event_name == 'pull_request' && !startsWith(github.ref, 'refs/heads/dependabot') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create comment
uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa #v3.0.2
if: steps.fc.outputs.comment-id == ''
with:
body: ":octocat: [Demo is available here](http://${{ github.event.number }}.talend.surge.sh)"
fingerprint: ${{ github.event.number }}
replace: please
issue-number: ${{ github.event.number }}
body: |
Storybook for this PR deployed on this [github page](https://talend.github.io/ui/${{ github.event.number }})
Loading

0 comments on commit 2ab83f5

Please sign in to comment.