-
Notifications
You must be signed in to change notification settings - Fork 18
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
- Loading branch information
Showing
4 changed files
with
161 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,133 @@ | ||
name: Move IDE Tests | ||
|
||
on: workflow_call | ||
|
||
concurrency: | ||
group: move-ide-tests-${{ 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: npm setup | ||
uses: npm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # pin@v3.0.0 | ||
with: | ||
version: 9.1.1 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # pin@v4.0.2 | ||
with: | ||
node-version: "20" | ||
cache: "npm" | ||
|
||
- 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 # pin@v4.0.2 | ||
with: | ||
node-version: "20" | ||
|
||
- name: Install dependencies and start Xvfb (emulate display) | ||
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 | ||
npm install && npm install --save-dev @types/node @types/semver | ||
sudo add-apt-repository ppa:kisak/kisak-mesa -y | ||
sudo apt update | ||
sudo apt upgrade -y | ||
- 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: DISPLAY=:99.0 npm run test | ||
|
||
move-ide-build: | ||
name: Move IDE 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 # pin@v4.0.2 | ||
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 | ||
|
||
move-ide-build-with-binaries: | ||
name: Move IDE build with released binaries | ||
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 # pin@v4.0.2 | ||
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 | ||
npm install -g vsce | ||
sudo apt install zsh -y | ||
- name: Build VSCode extensions | ||
working-directory: ./external-crates/move/crates/move-analyzer/editors/code | ||
run: ./scripts/create.sh -pkg | ||
|
||
- name: Print built files | ||
working-directory: ./external-crates/move/crates/move-analyzer/editors/code | ||
run: echo *.vsix |
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