-
-
Notifications
You must be signed in to change notification settings - Fork 162
66 lines (65 loc) · 2.13 KB
/
test_and_publish.yml
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
name: Test autoDocstring
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
unit_tests:
runs-on: "${{ matrix.os }}"
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [16]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "${{ matrix.node-version }}"
cache: "npm"
- run: npm install
- run: npm run vscode:prepublish
- run: npm run unit_test
integration_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: "npm"
- run: npm install
- run: npm run prepare_integration_tests
- uses: GabrielBB/xvfb-action@v1
with:
options: -screen 0 1024x768x24
run: npm run integration_test
publish:
needs:
- unit_tests
- integration_tests
if: startsWith(github.event.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: "npm"
- run: npm ci
- name: GitHub Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
body: |
# Summary
See [changelog](https://github.com/NilsJPWerner/autoDocstring/blob/master/CHANGELOG.md)
name: ${{ github.ref_name }}
fail_on_unmatched_files: true
- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com