Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ max_line_length = 120
[*.rs]
indent_size = 4

[*.py]
indent_size = 4
indent_style = space

[*.{md,yml,yaml}]
indent_style = space
indent_size = 2
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: test

on:
push:
branches: [main]
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
e2e-testing:
strategy:
fail-fast: false
matrix:
runs-on:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.runs-on }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable

- name: Create dummy tag
run: git tag -f CI

- name: Run unit tests
id: cargo-test
continue-on-error: true
run: cargo test

- name: Run tests
working-directory: testing
run: |
pip install uv
uv venv
. ${{ matrix.runs-on == 'windows-latest' && '.venv/Scripts/activate' || '.venv/bin/activate'}}
uv pip sync requirements.txt
pytest -vv --junitxml=.results.xml --color=yes

- name: Report failures
if: always()
uses: pmeier/pytest-results-action@main
with:
path: testing/.results.xml
summary: true
fail-on-empty: true
title: E2E Test Results

- name: Fail if unit tests failed
if: steps.cargo-test.outcome == 'failure'
run: exit 1
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ out/
dist/*
*.vsix
syntaxes/*.json
.venv
__pycache__
.*_cache
12 changes: 12 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "E2E Tests",
"type": "debugpy",
"request": "launch",
"program": ".venv/bin/pytest",
"args": ["-v"],
"cwd": "${workspaceFolder}/testing",
"console": "integratedTerminal",
"windows": {
"program": ".venv/Scripts/pytest.exe"
}
},
{
"type": "lldb",
"request": "attach",
Expand Down
3 changes: 1 addition & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off",
"typescript.tsdk": "node_modules/typescript/lib",
"python.languageServer": "None"
"typescript.tsdk": "node_modules/typescript/lib"
}
Loading