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

Add upstream LSP tests to CI #210

Merged
merged 19 commits into from
Sep 19, 2024
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
16 changes: 0 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,12 @@ jobs:
name: Test
command: npm run test -- --runInBand

E2E tests:
executor: node
steps:
- checkout
- npm-install
- run: sudo apt update && sudo apt install -y libasound2 libgbm1 libgtk-3-0 libnss3 xvfb
- run:
name: Build
command: npm run build:production
- run:
command: echo 'APOLLO_KEY="service:bob-123:489fhseo4"' > ./sampleWorkspace/spotifyGraph/.env
- run:
name: E2E tests
command: xvfb-run -a npm run test:extension

workflows:
build-test-deploy:
jobs:
- lint
- typescript
- test
- E2E tests
security-scans:
jobs:
- secops/gitleaks:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/E2E.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Run E2E tests
on:
pull_request:
push:
branches:
- main
jobs:
test:
name: Run E2E tests
runs-on: ubuntu-latest
steps:
- run: sudo apt update && sudo apt install -y libasound2 libgbm1 libgtk-3-0 libnss3 xvfb expect
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: "npm"
- run: npm install
- run: npm run build:production
- run: echo 'APOLLO_KEY="service:bob-123:489fhseo4"' > ./sampleWorkspace/spotifyGraph/.env
- run: |
expect <<EOF
spawn ./node_modules/.bin/rover config auth --profile VSCode-E2E
expect "Copy the key and paste it into the prompt below."
send -- "test\n"
expect eof
EOF
- run: xvfb-run -a npm run test:extension
2 changes: 2 additions & 0 deletions jest.e2e.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ const path = require("path");

module.exports = {
moduleFileExtensions: ["js", "ts"],
// restrict the roots here so jest doesn't complain about *other* snapshots it sees as obsolete
roots: ["<rootDir>/src/language-server/__e2e__"],
testMatch: ["<rootDir>/src/**/*.e2e.ts"],
testEnvironment: "./src/__e2e__/vscode-environment.js",
setupFiles: ["./src/__e2e__/setup.js"],
Expand Down
Loading