-
Notifications
You must be signed in to change notification settings - Fork 1
158 lines (151 loc) · 4.35 KB
/
ci.yaml
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
on:
push:
branches: [develop]
pull_request:
branches: [develop]
release:
types: [created]
jobs:
test:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
hatchet-version: ['1.3.1', '1.4.0']
vscode-version: ['1.84.2']
exclude:
- python-version: '3.12'
hatchet-version: '1.3.1'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install Node.js Dependencies
run: npm install
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install Python Dependencies
run: pip install hatchet==${{ matrix.hatchet-version }}
- name: Run Linux Tests
if: runner.os == 'Linux'
run: xvfb-run -a npm test -- ${{ matrix.vscode-version }}
- name: Run Tests
if: runner.os != 'Linux'
run: npm test -- ${{ matrix.vscode-version }}
test-stable:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
hatchet-version: ['1.3.1', '1.4.0']
exclude:
- python-version: '3.12'
hatchet-version: '1.3.1'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install Node.js Dependencies
run: npm install
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install Python Dependencies
run: pip install hatchet==${{ matrix.hatchet-version }}
- name: Run Linux Tests
if: runner.os == 'Linux'
run: xvfb-run -a npm test -- stable
- name: Run Tests
if: runner.os != 'Linux'
run: npm test -- stable
are_stable_tests_passing:
needs: [test-stable]
runs-on: ubuntu-latest
steps:
- name: Check Stable Tests
run: echo "Stable tests are passing"
are_all_tests_passing:
needs: [test, test-stable]
runs-on: ubuntu-latest
steps:
- name: Check Tests
run: echo "All tests are passing"
coverage:
runs-on: ubuntu-latest
needs: are_stable_tests_passing
if: success()
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install Node.js Dependencies
run: npm install
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: 3.11
cache: 'pip'
- name: Install Python Dependencies
run: pip install hatchet
- name: Coverage
run: xvfb-run -a npm run coverage
- name: Upload coverage to CodeCov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
check-format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install Node.js Dependencies
run: npm install
- name: Check Format
run: npm run check-format
publish:
runs-on: ubuntu-latest
permissions:
contents: write
needs: are_all_tests_passing
if: success() && startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install Node.js Dependencies
run: npm install
- name: Package
run: npm run package
- name: Upload Release Artifact
uses: softprops/action-gh-release@v2
with:
files: '*.vsix'
fail_on_unmatched_files: true
- name: Deploy
run: npm run deploy
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}