-
Notifications
You must be signed in to change notification settings - Fork 29
108 lines (92 loc) · 2.94 KB
/
Copy pathpush-check.yml
File metadata and controls
108 lines (92 loc) · 2.94 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
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
name: Push Validation
on:
push:
branches:
- 'main'
- 'release'
- 'release/*'
- 'release-*'
env:
NODE_VERSION: 24.17.0
PYTHON_VERSION: '3.10'
TEST_RESULTS_DIRECTORY: .
# Force a path with spaces and unicode chars to test extension works in these scenarios
special-working-directory: './testingDir'
special-working-directory-relative: 'testingDir'
jobs:
build-vsix:
name: Create VSIX
if: github.repository_owner == 'microsoft'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
with:
submodules: recursive
- name: Build VSIX
uses: ./.github/actions/build-vsix
with:
node_version: ${{ env.NODE_VERSION}}
python_version: ${{ env.PYTHON_VERSION }}
lint:
name: Lint
if: github.repository_owner == 'microsoft'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
with:
submodules: recursive
- name: Lint
uses: ./.github/actions/lint
with:
node_version: ${{ env.NODE_VERSION }}
python_version: ${{ env.PYTHON_VERSION }}
tests:
name: Tests
if: github.repository_owner == 'microsoft'
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: ${{ env.special-working-directory }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
with:
path: ${{ env.special-working-directory-relative }}
- name: Checkout submodules
run: git submodule update --init --recursive
shell: bash
# Install bundled libs using env.PYTHON_VERSION even though you test it on other versions.
- name: Use Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Update pip, install wheel and nox
run: python -m pip install -U pip wheel nox
shell: bash
# This will install libraries to a target directory.
- name: Install bundled python libraries
run: python -m nox --session install_bundled_libs
shell: bash
# Now that the bundle is installed to target using env.PYTHON_VERSION
# switch back the python we want to test with
- name: Use Python ${{ matrix.python }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
# The new python may not have nox so install it again
- name: Update pip, install wheel and nox (again)
run: python -m pip install -U pip wheel nox
shell: bash
- name: Run tests
run: python -m nox --session tests
shell: bash
- name: Validate README.md
run: python -m nox --session validate_readme
shell: bash