-
Notifications
You must be signed in to change notification settings - Fork 4
72 lines (71 loc) · 1.8 KB
/
ci.yml
File metadata and controls
72 lines (71 loc) · 1.8 KB
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
67
68
69
70
71
72
name: CI
on:
push:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install tox
run: pip install tox
- run: npm install
- run: xvfb-run -a npm test
if: runner.os == 'Linux'
- run: npm test
if: runner.os != 'Linux'
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- run: npm install
- run: npm run lint
package:
runs-on: ubuntu-latest
needs: [test, lint]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- run: npm install
- run: npm run package
- name: Upload
uses: actions/upload-artifact@v2
with:
name: "vscode-python-tox-${{ github.sha }}"
path: "*.vsix"
- name: Publish to Marketplace
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
run: npm run publish
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
- name: Publish to Open VSX
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
run: "npx ovsx publish *.vsix -p ${{ secrets.OPEN_VSX_TOKEN }}"