-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/text-chat
- Loading branch information
Showing
34 changed files
with
13,655 additions
and
37,244 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,44 @@ | ||
--- | ||
name: NPM Install, Build, and Cache | ||
description: NPM Install Dependencies, NPM Run Build, and Cache Dependencies & Artifacts | ||
|
||
outputs: | ||
npm-deps-cache-hit: | ||
description: "Whether or not the npm dependencies are cached" | ||
value: ${{ steps.cache-npm-deps.outputs.cache-hit }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up nodejs | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: ".nvmrc" | ||
cache: npm | ||
|
||
- name: Cache NPM dependencies | ||
uses: actions/cache@v3 | ||
id: cache-npm-deps | ||
with: | ||
path: | | ||
node_modules | ||
~/.cache | ||
key: ${{ runner.os }}-npm-v3-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache-npm-deps.outputs.cache-hit != 'true' | ||
shell: bash | ||
run: npm ci | ||
|
||
- name: Build | ||
shell: bash | ||
run: npm run build | ||
|
||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: build-artifacts | ||
path: | | ||
packages/**/build/* | ||
e2e-tests/build/* | ||
if-no-files-found: error |
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,25 @@ | ||
--- | ||
name: Retrieve Dependencies and Build Artifacts | ||
description: Retrieve cached NPM Install Dependencies and NPM Run Build Artifacts | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Download build artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: build-artifacts | ||
|
||
- name: Set up nodejs | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: ".nvmrc" | ||
cache: npm | ||
|
||
- name: Cache NPM dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
node_modules | ||
~/.cache | ||
key: ${{ runner.os }}-npm-v3-${{ hashFiles('package-lock.json') }} |
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,58 +11,139 @@ permissions: | |
checks: write | ||
|
||
jobs: | ||
main: | ||
name: Main | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cache | ||
key: ${{ runner.os }} | ||
- name: "NPM Install, Build, and Cache" | ||
id: npm-install-build-and-cache | ||
uses: ./.github/actions/npm-install-build-and-cache | ||
|
||
- name: Set up nodejs | ||
uses: actions/setup-node@v3 | ||
test: | ||
name: Test | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
node-version-file: ".nvmrc" | ||
cache: npm | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
persist-credentials: false | ||
|
||
- name: Build | ||
run: npm run build | ||
- name: "Retrieve Dependencies and Build Artifacts" | ||
id: retrieve-deps-and-build | ||
uses: ./.github/actions/retrieve-deps-and-build | ||
|
||
- name: Test | ||
run: npm run test-all | ||
|
||
type-check: | ||
name: Type Check | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: "Retrieve Dependencies and Build Artifacts" | ||
id: retrieve-deps-and-build | ||
uses: ./.github/actions/retrieve-deps-and-build | ||
|
||
- name: Type Check | ||
run: npm run type-check-all | ||
|
||
lint: | ||
name: Lint | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: "Retrieve Dependencies and Build Artifacts" | ||
id: retrieve-deps-and-build | ||
uses: ./.github/actions/retrieve-deps-and-build | ||
|
||
- name: Lint | ||
run: npm run lint-all | ||
|
||
summary: | ||
name: Summary | ||
needs: [build, test, type-check, lint] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Summary | ||
run: | | ||
echo "Build: ${{ needs.build.result }}" | ||
echo "Test: ${{ needs.test.result }}" | ||
echo "Type Check: ${{ needs.type-check.result }}" | ||
echo "Lint: ${{ needs.lint.result }}" | ||
publish-experimental-packages: | ||
name: Publish Experimental Packages | ||
needs: summary | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: "Retrieve Dependencies and Build Artifacts" | ||
id: retrieve-deps-and-build | ||
uses: ./.github/actions/retrieve-deps-and-build | ||
|
||
- name: Publish | ||
run: | | ||
# Set up git user for lerna to create a local commit with | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "lerna-ci-mml" | ||
# Set up npm auth token from secret for publishing | ||
echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc | ||
# Attempt to publish at the current version - this will skip if the version already exists | ||
echo "Attempting to publishing latest version" | ||
./node_modules/.bin/lerna publish from-package --no-private --dist-tag latest --ignore-scripts --ignore-changes --no-push --yes | ||
# Publish the current commit as an "experimental" version | ||
version="0.0.0-experimental-$(git rev-parse --short HEAD)-$(date +'%Y%m%d')" | ||
echo "Publishing experimental version $version" | ||
./node_modules/.bin/lerna publish $version --no-private --dist-tag experimental --ignore-scripts --ignore-changes --no-push --yes | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
|
||
publish-release-packages: | ||
name: Publish Packages | ||
environment: package-release | ||
needs: summary | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: "Retrieve Dependencies and Build Artifacts" | ||
id: retrieve-deps-and-build | ||
uses: ./.github/actions/retrieve-deps-and-build | ||
|
||
- name: Publish | ||
run: | | ||
# Set up git user for lerna to create a local commit with | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "lerna-ci-mml" | ||
# Set up npm auth token from secret for publishing | ||
echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc | ||
# Attempt to publish at the current version - this will skip if the version already exists | ||
echo "Attempting to publishing latest version" | ||
./node_modules/.bin/lerna publish from-package --no-private --dist-tag latest --ignore-scripts --ignore-changes --no-push --yes | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_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 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 |
---|---|---|
@@ -1 +1 @@ | ||
v16 | ||
v18.16.0 |
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.