-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c939779
commit 16b654c
Showing
16 changed files
with
856 additions
and
64 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,42 @@ | ||
name: React Lint, Tests and Publish | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'packages/react/**' | ||
- '!examples/**' | ||
- '!packages/sdk/**' | ||
- '!packages/ui/**' | ||
- '!storybook/**' | ||
|
||
jobs: | ||
react: | ||
runs-on: ubuntu-22.04 | ||
defaults: | ||
run: | ||
working-directory: packages/react/ | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 # TODO: SHA commit instead of version | ||
|
||
- name: Setup Node version | ||
uses: actions/setup-node@v4 # TODO: SHA commit instead of version | ||
with: | ||
node-version-file: '.nvmrc' # Root of the repository. | ||
|
||
# TODO: NPM login instead of auth token? | ||
- name: Authenticate with private NPM package | ||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | ||
|
||
- name: Install dependencies | ||
run: npm ci --ignore-scripts | ||
|
||
# TODO: Identify if we need to lint. | ||
# - name: Lint check | ||
# run: npm run lint | ||
|
||
# TODO: Enable when tests are done. | ||
# - name: Tests | ||
# run: npm run test | ||
|
||
# TODO: NPM publish. |
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,36 @@ | ||
name: SDK Lint, Tests and Publish | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'packages/sdk/**' | ||
- '!examples/**' | ||
- '!packages/react/**' | ||
- '!packages/ui/**' | ||
- '!storybook/**' | ||
|
||
jobs: | ||
sdk: | ||
runs-on: ubuntu-22.04 | ||
defaults: | ||
run: | ||
working-directory: packages/sdk/ | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 # TODO: SHA commit instead of version | ||
|
||
- name: Setup Node version | ||
uses: actions/setup-node@v4 # TODO: SHA commit instead of version | ||
with: | ||
node-version-file: '.nvmrc' # Root of the repository. | ||
|
||
- name: Install dependencies | ||
run: npm ci --ignore-scripts | ||
|
||
- name: Lint check | ||
run: npm run lint | ||
|
||
- name: Tests | ||
run: npm run test | ||
|
||
# TODO: NPM publish. |
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,84 @@ | ||
name: Storybook Lint, Build and Deploy | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'storybook/**' | ||
- '!examples/**' | ||
- '!packages/react/**' | ||
- '!packages/sdk/**' | ||
- '!packages/ui/**' | ||
|
||
jobs: | ||
storybook: | ||
runs-on: ubuntu-22.04 | ||
defaults: | ||
run: | ||
working-directory: storybook/ | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 # TODO: SHA commit instead of version | ||
|
||
- name: Setup Node version | ||
uses: actions/setup-node@v4 # TODO: SHA commit instead of version | ||
with: | ||
node-version-file: '.nvmrc' # Root of the repository. | ||
|
||
# TODO: NPM login instead of auth token? | ||
- name: Authenticate with private NPM package | ||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | ||
|
||
- name: Install dependencies | ||
run: npm ci --ignore-scripts | ||
|
||
- name: Lint check | ||
run: npm run lint | ||
|
||
- name: Build | ||
run: npm run build-storybook | ||
|
||
deploy: | ||
needs: storybook | ||
|
||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
permissions: | ||
pages: write | ||
id-token: write | ||
|
||
# Deploy to the github-pages environment. | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
runs-on: ubuntu-22.04 | ||
defaults: | ||
run: | ||
working-directory: storybook/ | ||
steps: | ||
- name: Archive artifact | ||
shell: sh | ||
run: | | ||
echo ::group::Archive artifact | ||
tar \ | ||
--dereference --hard-dereference \ | ||
--directory "storybook-static/" \ | ||
-cvf "$RUNNER_TEMP/artifact.tar" \ | ||
--exclude=.git \ | ||
--exclude=.github \ | ||
. | ||
echo ::endgroup:: | ||
- name: Upload artifact | ||
id: upload-artifact | ||
uses: actions/upload-artifact@v4 # TODO: SHA commit instead of version | ||
with: | ||
name: storybook | ||
path: ${{ runner.temp }}/artifact.tar | ||
retention-days: 90 | ||
if-no-files-found: error | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 # TODO: SHA commit instead of version | ||
with: | ||
artifact_name: storybook |
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,40 @@ | ||
name: UI Lint, Tests and Publish | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'packages/ui/**' | ||
- '!examples/**' | ||
- '!packages/react/**' | ||
- '!packages/sdk/**' | ||
- '!storybook/**' | ||
|
||
jobs: | ||
ui: | ||
runs-on: ubuntu-22.04 | ||
defaults: | ||
run: | ||
working-directory: packages/ui/ | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 # TODO: SHA commit instead of version | ||
|
||
- name: Setup Node version | ||
uses: actions/setup-node@v4 # TODO: SHA commit instead of version | ||
with: | ||
node-version-file: '.nvmrc' | ||
|
||
# TODO: NPM login instead of auth token? | ||
- name: Authenticate with private NPM package | ||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | ||
|
||
- name: Install dependencies | ||
run: npm ci --ignore-scripts | ||
|
||
- name: Lint check | ||
run: npm run lint | ||
|
||
- name: Tests | ||
run: npm run test | ||
|
||
# TODO: NPM publish. |
Oops, something went wrong.