Skip to content

Commit d9aa33b

Browse files
committed
move from appveyor to github actions
1 parent 7a19921 commit d9aa33b

File tree

5 files changed

+138
-17
lines changed

5 files changed

+138
-17
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Add vsix link comment to issues
2+
on:
3+
workflow_run:
4+
workflows: [Push vsix artifact pull release and comment]
5+
types: [completed]
6+
7+
8+
jobs:
9+
vsix-comments:
10+
if: github.event.workflow_run.conclusion=='success' && github.event.workflow_run.event=='pull_request'
11+
name: Add vsix link comment to issues
12+
runs-on: windows-2019
13+
steps:
14+
- name: Add vsix link comment to issues
15+
uses: tonyhallett/[email protected]
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
with:
19+
prefix: Please try
20+
suffix: Does this resolve your issue ?
21+
format: name
22+
addTo: pullandissues
23+
24+
25+

.github/workflows/push_pull.yaml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Push vsix artifact pull release and comment
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
types: [opened, synchronize, edited]
10+
env:
11+
CONFIGURATION: Release
12+
VSIX_PROJECT: FineCodeCoverage
13+
jobs:
14+
push-vsix-artifact-pull-release-and-comment:
15+
name: Push vsix artifact pull release and comment
16+
runs-on: windows-2019
17+
steps:
18+
- name: create variables
19+
shell: bash
20+
run: |
21+
echo "SOLN=${{env.VSIX_PROJECT}}.sln" >> $GITHUB_ENV
22+
echo "VSIX=${{github.workspace}}\${{env.VSIX_PROJECT}}\bin\${{env.CONFIGURATION}}\${{env.VSIX_PROJECT}}.vsix" >> $GITHUB_ENV # full path required for vsix publish
23+
- name: checkout
24+
uses: actions/checkout@v2
25+
with:
26+
fetch-depth: 0
27+
- name: Determine next version
28+
id: next-version
29+
uses: paulhatch/[email protected]
30+
with:
31+
short_tags: false
32+
branch: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'HEAD' }}
33+
34+
- name: set up msbuild
35+
uses: microsoft/[email protected]
36+
37+
- name: set up VSTest
38+
uses: darenm/Setup-VSTest@v1
39+
40+
- name: nuget restore
41+
run: nuget restore ${{env.SOLN}}
42+
43+
- name: Set version for Visual Studio Extension
44+
uses: cezarypiatek/[email protected]
45+
with:
46+
version: ${{steps.next-version.outputs.major}}.${{steps.next-version.outputs.minor}}.${{github.run_number}}.${{steps.next-version.outputs.patch}}
47+
vsix-manifest-file: ${{env.VSIX_PROJECT}}\source.extension.vsixmanifest
48+
49+
- name: build vsix
50+
run: |
51+
msbuild ${{env.SOLN}} /p:Configuration=${{env.CONFIGURATION}} /p:DeployExtension=False /verbosity:minimal
52+
53+
- name: vs test solution
54+
uses: tonyhallett/[email protected]
55+
56+
# above are common steps for push and pull
57+
58+
# pull only
59+
- name: upload vsix
60+
if: github.event_name == 'pull_request' && !github.event.pull_request.draft
61+
uses: actions/upload-artifact@v2
62+
with:
63+
name: FineCodeCoverage ( zipped vsix)
64+
path: ${{env.VSIX}}
65+
66+
# push only
67+
- name: create release
68+
if: github.event_name == 'push'
69+
id: create_release
70+
uses: actions/create-release@v1
71+
env:
72+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
with:
74+
tag_name: ${{steps.next-version.outputs.version_tag}}
75+
release_name: ${{steps.next-version.outputs.version_tag}}
76+
draft: false
77+
prerelease: falses
78+
- name: Update release asset
79+
if: github.event_name == 'push'
80+
id: upload-release-asset
81+
uses: actions/upload-release-asset@v1
82+
env:
83+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
84+
with:
85+
upload_url: ${{steps.create_release.outputs.upload_url}}
86+
asset_path: ${{env.VSIX}}
87+
asset_name: ${{env.VSIX_PROJECT}}.vsix
88+
asset_content_type: application/zip
89+
- name: add to marketplace
90+
if: github.event_name == 'push'
91+
uses: mrluje/vs-marketplace-publisher@v2
92+
with:
93+
pat: ${{ secrets.FCC_VS_MARKET_PLACE_PUBLISH_TOKEN }}
94+
manifestPath: ${{env.VSIX_PROJECT}}\vs-market-place-manifest.json
95+
vsixPath: ${{env.VSIX}}
96+
- name: comment - released and added to marketplace
97+
if: github.event_name == 'push'
98+
uses: tonyhallett/[email protected]
99+
env:
100+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101+
with:
102+
comment: released ${{steps.next-version.outputs.version_tag}} and available on marketplace
103+
addTo: pullandissues

FineCodeCoverage.sln

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution", "Solution", "{20
1010
.editorconfig = .editorconfig
1111
.gitattributes = .gitattributes
1212
.gitignore = .gitignore
13-
appveyor.yml = appveyor.yml
13+
.github\workflows\addVsixLinkToIssues.yaml = .github\workflows\addVsixLinkToIssues.yaml
1414
CHANGELOG.md = CHANGELOG.md
1515
CONTRIBUTING.md = CONTRIBUTING.md
1616
ISSUE_TEMPLATE.md = ISSUE_TEMPLATE.md
1717
LICENSE = LICENSE
18+
.github\workflows\push_pull.yaml = .github\workflows\push_pull.yaml
1819
README.md = README.md
1920
EndProjectSection
2021
EndProject

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Build status](https://ci.appveyor.com/api/projects/status/yq8s0ridnphpx4ig?svg=true)](https://ci.appveyor.com/project/FortuneN/finecodecoverage)
44

55
Download this extension from the [Visual Studio Market Place](https://marketplace.visualstudio.com/items?itemName=FortuneNgwenya.FineCodeCoverage)
6-
or get the [CI build](https://www.vsixgallery.com/extension/fcc-f339fe606-9d51-4fca-895c-d50375137b62). Previous versions can be obtained from [here](https://ci.appveyor.com/project/FortuneN/finecodecoverage/history).
6+
or download from [releases](https://github.com/FortuneN/FineCodeCoverage/releases). Older versions can be obtained from [here](https://ci.appveyor.com/project/FortuneN/finecodecoverage/history).
77

88
---------------------------------------
99
Prerequisites
@@ -98,7 +98,7 @@ If you encounter **0% coverage or inconsistent coverage** it is now possible to
9898
For now this is opt in. In the future Fine Code Coverage will determine the appropriate driver.
9999
Please consult [coverlet docs](https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/VSTestIntegration.md) for version support.
100100

101-
**Note that it is unnecessary to add the nuget coverlet.collector package as FCC internally supplies coverlet.collector 3.0.3**
101+
**Note that it is unnecessary to add the nuget coverlet.collector package as FCC internally supplies it.**
102102

103103
Fine Code Coverage will use the Data Collector driver under two circumstances :
104104
1) You are testing with runsettings that contains the coverlet collector ( and not disabled)

vs-market-place-manifest.json

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,11 @@
22
"$schema": "http://json.schemastore.org/vsix-publish",
33
"categories": [ "coding", "reporting", "testing" ],
44
"identity": {
5-
"description": "Visualize unit test code coverage easily for free in Visual Studio Community Edition (and other editions too)", // The description of the extension. Required for non-vsix extensions.
6-
"displayName": "Fine Code Coverage", // The display name of the extension. Required for non-vsix extensions.
7-
"icon": "\\path\\to\\icon.ico", // The path to an icon file (can be relative to the json file location). Required for non-vsix extensions.
8-
"installTargets": [ // The installation targets for the extension. Required for non-vsix extensions.
9-
{
10-
"sku": "Microsoft.VisualStudio.Community",
11-
"version": "[16.0, 17.0)"
12-
}
13-
],
5+
"description": "Visualize unit test code coverage easily for free in Visual Studio Community Edition (and other editions too)",
6+
"displayName": "Fine Code Coverage",
147
"internalName": "FineCodeCoverage",
15-
"language": "en-US", // The default language id of the extension. Can be in the "1033" or "en-US" format. Required for non-vsix extensions.
16-
"version": "1.1.0", // The version of the extension. Required for non-vsix extensions.
17-
"vsixId": "fcc-f339fe606-9d51-4fca-895c-d50375137b62", // The vsix id of the extension. Not required but useful for showing updates to installed extensions.
8+
"language": "en-US",
9+
"vsixId": "fcc-f339fe606-9d51-4fca-895c-d50375137b62",
1810
"tags": [
1911
".net",
2012
".net core",
@@ -38,8 +30,8 @@
3830
"unit test",
3931
"unit test coverage",
4032
"vb",
41-
"visual studio",
42-
],
33+
"visual studio"
34+
]
4335
},
4436
"overview": "vs-market-place-overview.md",
4537
"priceCategory": "free",

0 commit comments

Comments
 (0)