Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency checks and environment setup assistance #55

Merged
merged 68 commits into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from 64 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
2d28b57
Start dependency checking system.
petervdonovan May 20, 2022
656a3ca
Refactor extension.ts.
petervdonovan May 20, 2022
a23aef9
[tests] Get integration tests up and running.
petervdonovan May 24, 2022
7414b99
[style] Minor cleanups.
petervdonovan May 24, 2022
34a765c
[tests] Various bugfixes.
petervdonovan May 24, 2022
16ae135
Track debug configurations.
petervdonovan May 24, 2022
e3667d2
[CI] Set up tests in CI.
petervdonovan May 24, 2022
94c041e
[style] Minor cleanup.
petervdonovan May 27, 2022
e6b1ef7
[tests] Distinguish between basic and semi-optional dependencies.
petervdonovan May 27, 2022
82fbd71
[tests] Check that check for Python works.
petervdonovan May 27, 2022
5a6a002
[style] Cleanups.
petervdonovan May 27, 2022
6870c4c
Add Node dependency checking logic.
petervdonovan May 27, 2022
ed96e72
[tests] Do not bother with deleting dependencies.
petervdonovan May 28, 2022
68807f5
Add PNPM dependency checking logic.
petervdonovan May 28, 2022
abdd695
[CI] Reorganize a bit.
petervdonovan May 28, 2022
3654080
[CI] Workaround a quirk of PNPM installation.
petervdonovan May 30, 2022
290c410
[tests] Update debug configuration.
petervdonovan May 30, 2022
cb9d7fb
[dependencies] Bugfix.
petervdonovan May 30, 2022
abb1db3
Update submodule.
petervdonovan May 31, 2022
a26a009
[dependencies] Hook dependency checks into the UI.
petervdonovan May 30, 2022
64c4f6e
Give up checking if PNPM is installed.
petervdonovan Jun 2, 2022
802a40b
[CI] Delete Python in MacOS.
petervdonovan Jun 2, 2022
758671f
[dependencies] Add Rust version checker.
petervdonovan Jun 14, 2022
7005bee
[build] Separate npm install from build LDS.
petervdonovan Jun 14, 2022
eeba86b
Merge branch 'main' of https://github.com/lf-lang/vscode-lingua-franc…
petervdonovan Jun 14, 2022
3a13cf2
Update submodule.
petervdonovan Jun 14, 2022
10d2853
Merge branch 'main' into check-versions
petervdonovan Jun 14, 2022
29ee078
Update CI.yml.
petervdonovan Jun 14, 2022
f0ca034
Bugfix.
petervdonovan Jun 14, 2022
22e0f0b
[dependencies] The Rust install script is interactive.
petervdonovan Jun 14, 2022
a9971b0
[dependencies] Remove Rust if OS is MacOS.
petervdonovan Jun 14, 2022
c9990b2
[dependencies] Add check for cmake.
petervdonovan Jun 14, 2022
cb80001
[CI] MacOS does not permit removal of python3.
petervdonovan Jun 14, 2022
127aca0
[CI] MacOS apparently forbids removal of Java.
petervdonovan Jun 14, 2022
9e5c536
[dependencies] Set a minimum Rust version.
petervdonovan Jun 14, 2022
c2669c9
[dependencies] `python` may point to `python3`.
petervdonovan Jun 14, 2022
dc25309
[dependencies] Update dependency watcher registry.
petervdonovan Jun 14, 2022
87cfbe0
[dependencies] Offer to install Node.
petervdonovan Jun 14, 2022
a23037a
[CI] Do not download useless version history.
petervdonovan Jun 15, 2022
a0b064f
[dependencies] Bugfix.
petervdonovan Jun 15, 2022
0974227
[tests] More precisely specify what is on PATH.
petervdonovan Jun 15, 2022
827589e
[tests] Give up testing Node install in MacOS.
petervdonovan Jun 15, 2022
ef5da92
[tests] Give up testing Node install at all.
petervdonovan Jun 15, 2022
cc0a43b
[dependencies] openExternal function breaks CI.
petervdonovan Jun 15, 2022
b44351b
[dependencies] Check for RTI if appropriate.
petervdonovan Jun 16, 2022
d046ec5
[tests] Do not skip Python, Java dependency tests.
petervdonovan Jun 16, 2022
f77c309
[CI] Address CI failures.
petervdonovan Jun 16, 2022
968a838
[CI] Cleanups.
petervdonovan Jun 16, 2022
40ac333
[dependencies] Cleanups.
petervdonovan Jun 16, 2022
ccebe4b
[dependencies] Superficial UI improvements.
petervdonovan Jun 16, 2022
2e7738b
[dependencies] Add update commands.
petervdonovan Jun 16, 2022
9770aa8
[dependencies] Add back Rust installer.
petervdonovan Jun 16, 2022
53d2662
[dependencies] Improve "wrong version" messages.
petervdonovan Jun 16, 2022
d0539ce
[dependencies] Reduce redundancy.
petervdonovan Jun 16, 2022
ed77389
[tests] "Fix" a nondeterministic test.
petervdonovan Jun 17, 2022
1a3e278
[dependencies] Cleanups and a bugfix.
petervdonovan Jun 17, 2022
90a73e1
[dependencies] Refactor.
petervdonovan Jun 17, 2022
c1d1cfb
[dependencies] Another UI change.
petervdonovan Jun 17, 2022
d807980
[tests] Check that hyperlinks are not broken.
petervdonovan Jun 17, 2022
846778d
[build] Add back `npm install` script.
petervdonovan Jun 17, 2022
bcb99d7
[build] Bring back install-code.
petervdonovan Jun 17, 2022
e204452
[tests] Add tests for update commands.
petervdonovan Jun 18, 2022
56d0cd6
Merge branch 'main' into check-versions
petervdonovan Jul 16, 2022
86c7f35
Update src/version_checker.ts
petervdonovan Jul 16, 2022
a2c5860
Repair regexes.
petervdonovan Jul 21, 2022
9687328
Address comments from code review.
petervdonovan Jul 21, 2022
9ad2d80
Update LF submodule.
petervdonovan Jul 22, 2022
8294e4a
Bugfix.
petervdonovan Jul 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Build
description: Set up repository and install dependencies required to build extension.

runs:
using: "composite"
steps:
- name: Check out vscode-lingua-franca repository
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 1
- name: Prepare LF build environment
uses: ./lingua-franca/.github/actions/prepare-build-env
- name: Build the VS Code extension
run: npm install --ignore-scripts
shell: bash
85 changes: 71 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,77 @@ on:
# Trigger this workflow also on pull_request events.
pull_request:

jobs:
build:
runs-on: ubuntu-latest
jobs:
test:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
rust: [nightly]
runs-on: ${{ matrix.platform }}
steps:
- name: Check out vscode-lingua-franca repository
uses: actions/checkout@v3
- uses: lf-lang/vscode-lingua-franca/.github/actions/build@check-versions
- name: Install pylint
run: python3 -m pip install pylint
- name: Install pnpm
run: npm i -g pnpm
- name: Setup Rust
uses: ATiltedTree/setup-rust@v1
with:
submodules: recursive
fetch-depth: 0
- name: Prepare LF build environment
uses: ./lingua-franca/.github/actions/prepare-build-env
- name: Install VS Code
uses: ./.github/actions/install-code
- name: Build, deploy, and test the VS Code extension
rust-version: ${{ matrix.rust }}
components: clippy
- name: Install RTI
run: |
npm install
npm run test
cd lingua-franca
.github/actions/install-rti/install.sh
cd ..
shell: bash
if: ${{ runner.os == 'macOS' || runner.os == 'Linux' }}
- name: Run tests (Linux)
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test
if: ${{ runner.os == 'Linux' }}
- name: Run tests (non-Linux)
run: npm run test
if: ${{ runner.os != 'Linux' }}
test-dependencies-outdated:
strategy:
matrix:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: lf-lang/vscode-lingua-franca/.github/actions/build@check-versions
- name: Downgrade dependencies
run: |
pip install -I pylint==2.10.0
rustup default 1.26.0
- name: Run tests (Linux)
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test-dependencies-outdated
if: ${{ runner.os == 'Linux' }}
- name: Run tests (non-Linux)
run: npm run test-dependencies-outdated
if: ${{ runner.os != 'Linux' }}
test-dependencies-missing1:
petervdonovan marked this conversation as resolved.
Show resolved Hide resolved
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: lf-lang/vscode-lingua-franca/.github/actions/build@check-versions
- name: Run tests (Linux)
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test-dependencies-missing1
if: ${{ runner.os == 'Linux' }}
- name: Run tests (non-Linux)
run: npm run test-dependencies-missing1
if: ${{ runner.os != 'Linux' }}
test-dependencies-missing0:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: lf-lang/vscode-lingua-franca/.github/actions/build@check-versions
- name: Run tests (Linux)
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test-dependencies-missing0
if: ${{ runner.os == 'Linux' }}
- name: Run tests (non-Linux)
run: npm run test-dependencies-missing0
if: ${{ runner.os != 'Linux' }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*.jar
*.vsix
.vscode
.vscode-test
node_modules/*
out/*
.gradle/*
Expand Down
67 changes: 67 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"version": "0.2.0",
lhstrh marked this conversation as resolved.
Show resolved Hide resolved
"configurations": [
{
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"name": "Launch Extension",
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"request": "launch",
"type": "extensionHost"
},
{
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/test/index"
],
"env": {
"dependencies": "present"
},
"name": "Tests",
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "npm: compile-tests",
"request": "launch",
"runtimeExecutable": "${execPath}",
"type": "extensionHost"
},
{
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/test/index"
],
"env": {
"dependencies": "missing1"
},
"name": "Tests: Dependencies Missing1",
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "npm: compile-tests",
"request": "launch",
"runtimeExecutable": "${execPath}",
"type": "extensionHost"
},
{
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/test/index"
],
"env": {
"dependencies": "outdated"
},
"name": "Tests: Dependencies Outdated",
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "npm: compile-tests",
"request": "launch",
"runtimeExecutable": "${execPath}",
"type": "extensionHost"
},
]
}
9 changes: 9 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"version": "2.0.0",
lhstrh marked this conversation as resolved.
Show resolved Hide resolved
"tasks": [
{
"type": "npm",
"script": "compile-tests"
}
]
}
1 change: 1 addition & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ node_modules/
lingua-franca/
__pycache__/*
src/**
out/test/**

*.vsix
.gitignore
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ npm run test
```

## Adding tests
Tests are located in the `src` directory and are marked using the `.test.ts` extension. We use [Jest](https://jestjs.io/) as our testing framework.
Tests are located in the `src` directory and are marked using the `.test.ts` extension. We use [Mocha](https://mochajs.org/) as our testing framework.

## Submitting a Pull Request (PR)
Please keep your PRs manageable and easy to review.
Expand Down
8 changes: 0 additions & 8 deletions jest.config.ts

This file was deleted.

Loading