test #204
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
permissions: | |
actions: read | |
contents: read | |
deployments: read | |
packages: none | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
disable-sudo: true | |
disable-telemetry: true | |
egress-policy: block | |
allowed-endpoints: > | |
devdiv.pkgs.visualstudio.com:443 | |
github.com:443 | |
marketplace.visualstudio.com:443 | |
objects.githubusercontent.com:443 | |
registry.npmjs.org:443 | |
update.code.visualstudio.com:443 | |
vscode.download.prss.microsoft.com:443 | |
- name: Checkout Branch | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
- name: Setup Node.js | |
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 | |
with: | |
node-version: 20 | |
- name: Build Extension | |
run: | | |
npm run install:all | |
- name: Smoke test (Linux) | |
run: xvfb-run -a npm run test | |
if: runner.os == 'Linux' | |
- name: Smoke test (Mac, Windows) | |
run: npm run test | |
if: runner.os != 'Linux' | |
- name: Package Extension | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
npm run package | |
mkdir vsix | |
mv *.vsix vsix | |
- name: Archive Extension | |
if: matrix.os == 'ubuntu-latest' | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: vsix | |
path: vsix |