-
Notifications
You must be signed in to change notification settings - Fork 6
110 lines (107 loc) · 3.1 KB
/
main.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Main
on:
pull_request:
push:
branches: [master]
jobs:
build:
strategy:
matrix:
os: [
macos-latest,
ubuntu-latest,
windows-latest,
]
env:
CONAN_HOME: "${{ github.workspace }}/conan-cache"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # for commit linting and semantic-release
persist-credentials: false
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pipenv'
- name: Install pipenv
run: |
curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- name: Cache .vscode-test
uses: actions/cache@v3
with:
path: packages/packet-viewer/.vscode-test
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache .conan
uses: actions/cache@v3
with:
path: ${{ env.CONAN_HOME }}
key: ${{ runner.os }}-conan-${{ hashFiles('packages/parquet-reader/conanfile.txt') }}
- run: npm ci
- name: Static checks
run: |
npm run spellcheck
npm run lint
if: matrix.os == 'ubuntu-latest'
- run: xvfb-run -a npm test
if: matrix.os == 'ubuntu-latest'
- run: npm test
if: matrix.os != 'ubuntu-latest'
- name: Upload prebuilds
if: '!env.ACT'
uses: actions/upload-artifact@v3
with:
name: prebuilds
path: packages/parquet-reader/prebuilds
retention-days: 1
release:
runs-on: ubuntu-latest
needs: build
env:
HUSKY: 0
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # for commit linting and semantic-release
persist-credentials: false
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pipenv'
- name: Install pipenv
run: |
curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- uses: actions/download-artifact@v3
with:
name: prebuilds
path: packages/parquet-reader/prebuilds
- run: npm ci
- name: Release
env:
GH_TOKEN: ${{ secrets.RELEASE_PAT }}
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_PAT: ${{ secrets.OVSX_PAT }}
run: npx --no-workspaces semantic-release
- name: Package
if: github.ref != 'refs/heads/master'
uses: lannonbr/vsce-action@master
with:
args: "package"
- name: Upload
if: github.ref != 'refs/heads/master' && !env.ACT
uses: actions/upload-artifact@v3
with:
name: vscode-package
path: parquet-viewer-*.vsix