-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into tooling-general/use-action-gh-release-action
- Loading branch information
Showing
58 changed files
with
3,155 additions
and
121 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
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,96 @@ | ||
name: Move IDE | ||
|
||
on: workflow_call | ||
|
||
concurrency: | ||
group: move-ide-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
move-auto-formatter-test: | ||
name: Move Auto-formatter Test | ||
runs-on: [self-hosted] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1 | ||
with: | ||
ref: ${{ github.event.inputs.iota_repo_ref || github.ref }} | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # [email protected] | ||
with: | ||
node-version: "20" | ||
|
||
- name: Install dependencies | ||
working-directory: ./external-crates/move/crates/move-analyzer/prettier-plugin | ||
run: npm install && npm i web-tree-sitter | ||
|
||
- name: Run npm test | ||
working-directory: ./external-crates/move/crates/move-analyzer/prettier-plugin | ||
shell: bash | ||
run: npm run test | ||
|
||
move-ide-test: | ||
name: Move IDE Test | ||
runs-on: [self-hosted] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1 | ||
with: | ||
ref: ${{ github.event.inputs.iota_repo_ref || github.ref }} | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # [email protected] | ||
with: | ||
node-version: "20" | ||
|
||
- name: Install dependencies and start Xvfb (emulate a display so VS Code can be started) | ||
working-directory: ./external-crates/move/crates/move-analyzer/editors/code | ||
run: | | ||
sudo apt install libgtk-3-0 -y | ||
sudo apt-get install -y xvfb x11-apps x11-xkb-utils libx11-6 libx11-xcb1 | ||
set -eux | ||
# Start server | ||
/usr/bin/Xvfb :99 -screen 0 1024x768x24 & | ||
sleep 1 | ||
ps aux | grep Xvfb --color=always | grep -v grep | ||
sudo add-apt-repository ppa:kisak/kisak-mesa -y | ||
sudo apt update | ||
sudo apt upgrade -y | ||
npm install && npm install --save-dev @types/node @types/semver | ||
- name: Build move-analyzer | ||
run: | | ||
cargo build --bin move-analyzer | ||
mkdir -p ~/.iota/bin | ||
cp ./target/debug/move-analyzer* ~/.iota/bin | ||
- name: Run npm test | ||
working-directory: ./external-crates/move/crates/move-analyzer/editors/code | ||
shell: bash | ||
run: npm run pretest && DISPLAY=:99.0 npm run test | ||
|
||
move-vscode-extension-build: | ||
name: Move VSCode extension build | ||
runs-on: [self-hosted] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1 | ||
with: | ||
ref: ${{ github.event.inputs.iota_repo_ref || github.ref }} | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # [email protected] | ||
with: | ||
node-version: "20" | ||
|
||
- name: Install dependencies | ||
working-directory: ./external-crates/move/crates/move-analyzer/editors/code | ||
run: npm install && npm install --save-dev @types/node @types/semver | ||
|
||
- name: Build VSCode extension | ||
working-directory: ./external-crates/move/crates/move-analyzer/editors/code | ||
run: npm run package |
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
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
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 @@ | ||
// Copyright (c) 2024 IOTA Stiftung | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import toast, { Toaster as ToasterLib, type ToastType, resolveValue } from 'react-hot-toast'; | ||
import { Snackbar, SnackbarType } from '@iota/apps-ui-kit'; | ||
|
||
export type ToasterProps = { | ||
bottomNavEnabled?: boolean; | ||
}; | ||
|
||
export function Toaster() { | ||
function getSnackbarType(type: ToastType): SnackbarType { | ||
switch (type) { | ||
case 'success': | ||
return SnackbarType.Default; | ||
case 'error': | ||
return SnackbarType.Error; | ||
case 'loading': | ||
return SnackbarType.Default; | ||
default: | ||
return SnackbarType.Default; | ||
} | ||
} | ||
|
||
return ( | ||
<ToasterLib position="bottom-right" containerClassName="!z-[999999] !right-8"> | ||
{(t) => ( | ||
<div style={{ opacity: t.visible ? 1 : 0 }}> | ||
<Snackbar | ||
onClose={() => toast.dismiss(t.id)} | ||
text={resolveValue(t.message, t)} | ||
type={getSnackbarType(t.type)} | ||
showClose | ||
duration={t.duration} | ||
/> | ||
</div> | ||
)} | ||
</ToasterLib> | ||
); | ||
} |
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
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.