Skip to content

Commit 3ce945e

Browse files
fix broken workflow
1 parent 021a876 commit 3ce945e

2 files changed

Lines changed: 75 additions & 107 deletions

File tree

.github/actions/run-vscode-e2e-tests/action.yml

Lines changed: 0 additions & 99 deletions
This file was deleted.

.github/workflows/e2e-tests.yml

Lines changed: 75 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: 'E2E Tests'
2-
description: 'Reusable workflow for running VS Code E2E tests'
32

43
on:
54
workflow_call:
@@ -22,23 +21,91 @@ jobs:
2221
vscode-get-test-file-matrix:
2322
runs-on: ubuntu-latest
2423
outputs:
25-
test_file_matrix: ${{ steps.get-matrix.outputs.test_file_matrix }}
24+
test_file_matrix: ${{ steps.vscode-get-test-file-matrix.outputs.test_file_matrix }}
25+
steps:
26+
- uses: actions/checkout@v5
27+
- uses: actions/setup-node@v4
28+
with:
29+
node-version-file: ".nvmrc"
30+
31+
- name: Cache npm
32+
uses: actions/cache@v4
33+
with:
34+
path: ~/.npm
35+
key: ${{ runner.os }}-npm-cache-matrix-${{ hashFiles('core/package-lock.json', 'extensions/vscode/package-lock.json') }}
36+
37+
- name: Cache packages node_modules
38+
uses: actions/cache@v4
39+
with:
40+
path: |
41+
packages/*/node_modules
42+
key: ${{ runner.os }}-packages-node-modules-${{ hashFiles('packages/*/package-lock.json') }}
43+
44+
- name: Cache core node modules
45+
uses: actions/cache@v4
46+
with:
47+
path: core/node_modules
48+
key: ${{ runner.os }}-core-node-modules-${{ hashFiles('core/package-lock.json') }}
49+
50+
- name: Cache vscode extension node modules
51+
uses: actions/cache@v4
52+
id: vscode-cache
53+
with:
54+
path: extensions/vscode/node_modules
55+
key: ${{ runner.os }}-vscode-node-modules-${{ hashFiles('extensions/vscode/package-lock.json') }}
56+
57+
- name: Build packages and get test files
58+
id: vscode-get-test-file-matrix
59+
run: |
60+
node ./scripts/build-packages.js
61+
cd extensions/vscode
62+
npm ci
63+
npm run e2e:compile
64+
if [[ "${{ inputs.is_fork }}" == "true" ]]; then
65+
# Exclude SSH tests for forks
66+
FILES=$(ls -1 e2e/_output/tests/*.test.js | grep -v "SSH" | jq -R . | jq -s .)
67+
else
68+
# Include all tests for non-forks
69+
FILES=$(ls -1 e2e/_output/tests/*.test.js | jq -R . | jq -s .)
70+
fi
71+
echo "test_file_matrix<<EOF" >> $GITHUB_OUTPUT
72+
echo "$FILES" >> $GITHUB_OUTPUT
73+
echo "EOF" >> $GITHUB_OUTPUT
74+
env:
75+
# https://github.com/microsoft/vscode-ripgrep/issues/9#issuecomment-643965333
76+
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
77+
78+
- name: Debug Outputs
79+
run: |
80+
echo "Test files: ${{ steps.vscode-get-test-file-matrix.outputs.test_file_matrix }}"
81+
82+
vscode-package-extension-linux:
83+
runs-on: ubuntu-latest
84+
timeout-minutes: 15
2685
steps:
2786
- uses: actions/checkout@v5
2887
with:
2988
fetch-depth: 0
3089

31-
- name: Get test matrix
32-
id: get-matrix
33-
uses: ./.github/actions/run-vscode-e2e-tests
90+
- name: Build VS Code extension
91+
uses: ./.github/actions/build-vscode-extension
3492
with:
93+
platform: linux
94+
arch: x64
95+
npm_config_arch: x64
96+
pre-release: false
97+
commit-sha: ${{ github.sha }}
3598
github-token: ${{ secrets.GITHUB_TOKEN }}
36-
ci-github-token: ${{ secrets.CI_GITHUB_TOKEN }}
37-
is_fork: ${{ inputs.is_fork }}
99+
100+
- name: Upload build artifact
101+
uses: actions/upload-artifact@v4
102+
with:
103+
name: vscode-extension-build-Linux
104+
path: extensions/vscode/build
38105

39106
vscode-e2e-tests:
40107
name: ${{ matrix.test_file || 'unknown' }} (${{ matrix.command }})
41-
needs: [vscode-get-test-file-matrix]
108+
needs: [vscode-get-test-file-matrix, vscode-package-extension-linux]
42109
runs-on: ubuntu-latest
43110
timeout-minutes: 15
44111
strategy:

0 commit comments

Comments
 (0)