Skip to content

refactor: separate options model from page (#331) #26

refactor: separate options model from page (#331)

refactor: separate options model from page (#331) #26

name: Release Preview Extension
on:
workflow_dispatch:
push:
branches:
- main
env:
SOLUTION_FILE_PATH: .
DEFAULT_BRANCH: main
jobs:
build-project:
uses: snyk/snyk-visual-studio-plugin/.github/workflows/build-project.yml@main
with:
solution-file-path: .
channel: preview
secrets: inherit
run-integration-tests:
needs: build-project
uses: snyk/snyk-visual-studio-plugin/.github/workflows/integration-tests.yml@main
secrets: inherit
run-unit-tests:
needs: build-project
name: Run Unit-Tests
runs-on: windows-2022
defaults:
run:
working-directory: ${{ github.workspace }}
env:
TEST_API_TOKEN: ${{ secrets.TEST_API_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
- name: Setup VSTest
uses: darenm/Setup-VSTest@v1
- name: Tests
run: vstest.console.exe **\*.Tests.dll /TestCaseFilter:"FullyQualifiedName!=Xunit.Instances.VisualStudio&integration!=true" #exclude integration tests and the psuedo-tests that launch a VS instance
release:
needs: [build-project, run-integration-tests, run-unit-tests]
runs-on: windows-2022
defaults:
run:
working-directory: ${{ github.workspace }}
environment: snyk-msbuild-envs
env:
VsixManifestPath: .\Snyk.VisualStudio.Extension.2022\source.extension.vsixmanifest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
- name: Set up Git actions user
uses: fregante/setup-git-user@v1
- name: Publish 2022 extension to Marketplace
uses: cezarypiatek/VsixPublisherAction@0.2
with:
extension-file: '.\Snyk.VisualStudio.Extension.2022\bin\Release\Snyk.VisualStudio.Extension.vsix'
publish-manifest-file: '.\Snyk.VisualStudio.Extension.2022\vs-publish-preview.json'
personal-access-code: ${{ secrets.VS_PUBLISHER_ACCESS_TOKEN }}