-
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.
feat(CI): add Move IDE Tests workflow (#4226)
* feat(CI): add Move IDE Tests workflow * don't run move-ide-test if draft * Address review comments * Run on any change in external crates, fix test command * Rename diff output to isExternalCrates
- Loading branch information
Showing
4 changed files
with
122 additions
and
12 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