Skip to content

Commit

Permalink
Add upstream LSP tests to CI (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas authored Sep 19, 2024
1 parent 880c6f1 commit 247fa59
Show file tree
Hide file tree
Showing 16 changed files with 790 additions and 89 deletions.
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

0 comments on commit 247fa59

Please sign in to comment.