-
Notifications
You must be signed in to change notification settings - Fork 1
162 lines (135 loc) · 4.61 KB
/
vscode.yml
File metadata and controls
162 lines (135 loc) · 4.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# Cache: 2025-09-03 02:13:59
name: VS Code
on:
push:
branches: [main]
paths:
- "renamify-vscode/**"
- ".github/workflows/vscode.yml"
pull_request:
branches: [main]
paths:
- "renamify-vscode/**"
- ".github/workflows/vscode.yml"
jobs:
vscode_test:
name: Test VS Code Extension
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: renamify-vscode
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Wait for CI workflow to complete
uses: actions/github-script@v7
with:
script: |
const script = require('./.github/wait-for-checks.js');
await script({ github, context, core, checks: ["Test on", "Check MSRV"] });
- name: Download TypeScript bindings
uses: dawidd6/action-download-artifact@v2
with:
workflow: ci.yml
workflow_conclusion: success
name: typescript-bindings
path: ${{ github.workspace }}/renamify-core/bindings
search_artifacts: true
- name: Download renamify binary (Linux)
if: runner.os == 'Linux'
uses: dawidd6/action-download-artifact@v2
with:
workflow: ci.yml
workflow_conclusion: success
name: renamify-linux-x64
path: ${{ github.workspace }}/renamify-bin
- name: Download renamify binary (macOS)
if: runner.os == 'macOS'
uses: dawidd6/action-download-artifact@v2
with:
workflow: ci.yml
workflow_conclusion: success
name: renamify-macos-x64
path: ${{ github.workspace }}/renamify-bin
- name: Download renamify binary (Windows)
if: runner.os == 'Windows'
uses: dawidd6/action-download-artifact@v2
with:
workflow: ci.yml
workflow_conclusion: success
name: renamify-windows-x64
path: ${{ github.workspace }}/renamify-bin
- name: Make binary executable and add to PATH
shell: bash
run: |
# Debug: show where we are and what's available
echo "Current directory: $(pwd)"
echo "Workspace: ${{ github.workspace }}"
# Convert Windows path to Unix path for bash commands
if [[ "$RUNNER_OS" == "Windows" ]]; then
WORKSPACE=$(echo "${{ github.workspace }}" | sed 's|\\|/|g' | sed 's|D:|/d|')
else
WORKSPACE="${{ github.workspace }}"
fi
ls -la "$WORKSPACE/renamify-bin/"
if [[ "$RUNNER_OS" == "Windows" ]]; then
chmod +x "$WORKSPACE/renamify-bin/renamify.exe"
# Use original Windows path format for GITHUB_PATH
echo "${{ github.workspace }}\renamify-bin" >> $GITHUB_PATH
else
chmod +x "$WORKSPACE/renamify-bin/renamify"
echo "${{ github.workspace }}/renamify-bin" >> $GITHUB_PATH
fi
- name: Verify renamify is available (Windows)
if: runner.os == 'Windows'
run: renamify.exe --version
- name: Verify renamify is available (Unix)
if: runner.os != 'Windows'
run: renamify --version
- uses: pnpm/action-setup@v4
with:
version: latest
run_install: false
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('renamify-vscode/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Run TypeScript checks
run: pnpm compile
- name: Run Biome checks
if: runner.os != 'Windows'
run: pnpm check
- name: Build extension
run: pnpm package
- name: Run tests (Linux)
if: runner.os == 'Linux'
run: xvfb-run -a pnpm test
- name: Run tests (macOS/Windows)
if: runner.os != 'Linux'
run: pnpm test
- name: Upload VSIX artifact
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20.x'
uses: actions/upload-artifact@v4
with:
name: vscode-extension
path: renamify-vscode/*.vsix