Skip to content

Commit 7efe3ea

Browse files
committed
Ensure the CI uses node 18 and bash
1 parent 491d02a commit 7efe3ea

3 files changed

Lines changed: 61 additions & 32 deletions

File tree

.github/workflows/main.yml

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,28 @@ jobs:
1515
matrix:
1616
os: [ubuntu-latest, windows-latest]
1717
steps:
18+
- uses: actions/setup-node@v3
19+
with:
20+
node-version: '18'
21+
1822
- name: Checkout
1923
uses: actions/checkout@v2
2024
with:
2125
fetch-depth: 1
2226

23-
- uses: actions/setup-node@v1
24-
with:
25-
node-version: '18'
26-
2727
- name: Install dependencies
2828
working-directory: extensions/ql-vscode
2929
run: |
3030
npm install
31+
env:
32+
NODE_OPTIONS: --openssl-legacy-provider
3133
shell: bash
3234

3335
- name: Build
3436
working-directory: extensions/ql-vscode
3537
env:
3638
APP_INSIGHTS_KEY: '${{ secrets.APP_INSIGHTS_KEY }}'
39+
NODE_OPTIONS: --openssl-legacy-provider
3740
run: |
3841
npm run build
3942
shell: bash
@@ -75,60 +78,73 @@ jobs:
7578
matrix:
7679
os: [ubuntu-latest, windows-latest]
7780
steps:
81+
- uses: actions/setup-node@v3
82+
with:
83+
node-version: '18'
84+
7885
- name: Checkout
7986
uses: actions/checkout@v2
8087
with:
8188
fetch-depth: 1
8289

83-
- uses: actions/setup-node@v1
84-
with:
85-
node-version: '16.13.0'
86-
8790
- name: Install dependencies
91+
shell: bash
8892
working-directory: extensions/ql-vscode
93+
env:
94+
NODE_OPTIONS: --openssl-legacy-provider
8995
run: |
9096
npm install
91-
shell: bash
9297
9398
- name: Build
9499
working-directory: extensions/ql-vscode
100+
shell: bash
95101
env:
102+
NODE_OPTIONS: --openssl-legacy-provider
96103
APP_INSIGHTS_KEY: '${{ secrets.APP_INSIGHTS_KEY }}'
97104
run: |
98105
npm run build
99-
shell: bash
100106
101107
- name: Lint
108+
shell: bash
102109
working-directory: extensions/ql-vscode
110+
env:
111+
NODE_OPTIONS: --openssl-legacy-provider
103112
run: |
104113
npm run lint
105114
106115
- name: Run unit tests (Linux)
107116
working-directory: extensions/ql-vscode
117+
shell: bash
108118
if: matrix.os == 'ubuntu-latest'
119+
env:
120+
NODE_OPTIONS: --openssl-legacy-provider
109121
run: |
110122
npm run test
111123
112124
- name: Run unit tests (Windows)
113125
if: matrix.os == 'windows-latest'
126+
shell: bash
127+
env:
128+
NODE_OPTIONS: --openssl-legacy-provider
114129
working-directory: extensions/ql-vscode
115130
run: |
116131
npm run test
117132
118133
- name: Run integration tests (Linux)
119134
if: matrix.os == 'ubuntu-latest'
135+
shell: bash
120136
working-directory: extensions/ql-vscode
121137
env:
138+
NODE_OPTIONS: --openssl-legacy-provider
122139
VSCODE_CODEQL_GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
123140
run: |
124141
sudo apt-get install xvfb
125142
/usr/bin/xvfb-run npm run integration
126143
127144
- name: Run integration tests (Windows)
128145
if: matrix.os == 'windows-latest'
146+
shell: bash
129147
working-directory: extensions/ql-vscode
130-
env:
131-
VSCODE_CODEQL_GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
132148
run: |
133149
npm run integration
134150
@@ -146,24 +162,28 @@ jobs:
146162
TEST_CODEQL_PATH: '${{ github.workspace }}/codeql'
147163

148164
steps:
165+
- uses: actions/setup-node@v3
166+
with:
167+
node-version: '18'
168+
149169
- name: Checkout
150170
uses: actions/checkout@v2
151171

152-
- uses: actions/setup-node@v1
153-
with:
154-
node-version: '16.13.0'
155-
156172
- name: Install dependencies
157173
working-directory: extensions/ql-vscode
174+
shell: bash
175+
env:
176+
NODE_OPTIONS: --openssl-legacy-provider
158177
run: |
159178
npm install
160-
shell: bash
161179
162180
- name: Build
163181
working-directory: extensions/ql-vscode
182+
shell: bash
183+
env:
184+
NODE_OPTIONS: --openssl-legacy-provider
164185
run: |
165186
npm run build
166-
shell: bash
167187
168188
- name: Decide on ref of CodeQL repo
169189
id: choose-ref
@@ -190,11 +210,17 @@ jobs:
190210
- name: Run CLI tests (Linux)
191211
working-directory: extensions/ql-vscode
192212
if: matrix.os == 'ubuntu-latest'
213+
shell: bash
214+
env:
215+
NODE_OPTIONS: --openssl-legacy-provider
193216
run: |
194217
/usr/bin/xvfb-run npm run cli-integration
195218
196219
- name: Run CLI tests (Windows)
197220
working-directory: extensions/ql-vscode
198221
if: matrix.os == 'windows-latest'
222+
shell: bash
223+
env:
224+
NODE_OPTIONS: --openssl-legacy-provider
199225
run: |
200226
npm run cli-integration

.github/workflows/release.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,32 @@ jobs:
1717
name: Release
1818
runs-on: ubuntu-latest
1919
steps:
20+
- uses: actions/setup-node@v3
21+
with:
22+
node-version: '18'
23+
2024
- name: Checkout
2125
uses: actions/checkout@v2
2226

23-
- uses: actions/setup-node@v1
24-
with:
25-
node-version: '16.13.0'
26-
2727
- name: Install dependencies
28+
shell: bash
2829
run: |
2930
cd extensions/ql-vscode
3031
npm ci
31-
shell: bash
3232
3333
- name: Build
34+
shell: bash
3435
env:
36+
NODE_OPTIONS: --openssl-legacy-provider
3537
APP_INSIGHTS_KEY: '${{ secrets.APP_INSIGHTS_KEY }}'
3638
run: |
3739
echo "APP INSIGHTS KEY LENGTH: ${#APP_INSIGHTS_KEY}"
3840
cd extensions/ql-vscode
3941
npm run build -- --release
40-
shell: bash
4142
4243
- name: Prepare artifacts
4344
id: prepare-artifacts
45+
shell: bash
4446
run: |
4547
mkdir artifacts
4648
cp dist/*.vsix artifacts
@@ -95,12 +97,14 @@ jobs:
9597
# The checkout action does not fetch the main branch.
9698
# Fetch the main branch so that we can base the version bump PR against main.
9799
- name: Fetch main branch
100+
shell: bash
98101
run: |
99102
git fetch --depth=1 origin main:main
100103
git checkout main
101104
102105
- name: Bump patch version
103106
id: bump-patch-version
107+
shell: bash
104108
if: success()
105109
run: |
106110
cd extensions/ql-vscode
@@ -110,6 +114,7 @@ jobs:
110114
echo "::set-output name=next_version::$NEXT_VERSION"
111115
112116
- name: Add changelog for next release
117+
shell: bash
113118
if: success()
114119
run: |
115120
cd extensions/ql-vscode
@@ -132,15 +137,14 @@ jobs:
132137
needs: build
133138
environment: publish-vscode-marketplace
134139
runs-on: ubuntu-latest
135-
env:
136-
VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }}
137140
steps:
138141
- name: Download artifact
139142
uses: actions/download-artifact@v2
140143
with:
141144
name: vscode-codeql-extension
142145

143146
- name: Publish to Registry
147+
shell: bash
144148
run: |
145149
npx vsce publish -p $VSCE_TOKEN --packagePath *.vsix || \
146150
echo "Failed to publish to VS Code Marketplace. \
@@ -152,14 +156,13 @@ jobs:
152156
needs: build
153157
environment: publish-open-vsx
154158
runs-on: ubuntu-latest
155-
env:
156-
OPEN_VSX_TOKEN: ${{ secrets.OPEN_VSX_TOKEN }}
157159
steps:
158160
- name: Download artifact
159161
uses: actions/download-artifact@v2
160162
with:
161163
name: vscode-codeql-extension
162164

163165
- name: Publish to Registry
166+
shell: bash
164167
run: |
165168
npx ovsx publish -p $OPEN_VSX_TOKEN *.vsix

extensions/ql-vscode/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,11 +1115,11 @@
11151115
]
11161116
},
11171117
"scripts": {
1118-
"build": "NODE_OPTIONS=--openssl-legacy-provider gulp",
1118+
"build": "gulp",
11191119
"watch": "npm-run-all -p watch:*",
1120-
"watch:extension": "NODE_OPTIONS=--openssl-legacy-provider tsc --watch",
1121-
"watch:webpack": "NODE_OPTIONS=--openssl-legacy-provider gulp watchView",
1122-
"watch:css": "NODE_OPTIONS=--openssl-legacy-provider gulp watchCss",
1120+
"watch:extension": "tsc --watch",
1121+
"watch:webpack": "gulp watchView",
1122+
"watch:css": "gulp watchCss",
11231123
"test": "mocha --exit -r ts-node/register test/pure-tests/**/*.ts",
11241124
"preintegration": "rm -rf ./out/vscode-tests && npm run build",
11251125
"integration": "node ./out/vscode-tests/run-integration-tests.js no-workspace,minimal-workspace",

0 commit comments

Comments
 (0)