-
Notifications
You must be signed in to change notification settings - Fork 23
62 lines (60 loc) · 2.01 KB
/
pythonapp.yml
File metadata and controls
62 lines (60 loc) · 2.01 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
name: Python matrix CI
on:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-14]
python-version: ['3.10', '3.11', '3.12', '3.13']
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
uv sync --all-extras --dev
- name: Lint with flake8
run: |
uv run flake8 . --count --show-source --exit-zero --statistics
- name: Test with pytest
run: |
uv run pytest --cov=vdb test
env:
PYTHONPATH: .
TEST_VDB_HOME: vdb_data
- name: Generate SBOM with cdxgen
run: |
npm install -g @cyclonedx/cdxgen
cdxgen -t python -o bom.json . -p --profile research
uv sync --all-extras --dev
uv run vdb --cache --only-osv
uv run vdb --bom bom.json
if: ${{ matrix.python-version == '3.13' && matrix.os == 'ubuntu-latest' }}
- name: CLI tests
run: |
uv run vdb --search "pkg:maven/org.springframework/spring-core@6.0.13"
uv run vdb --search "pkg:maven/org.hibernate.orm/hibernate-core@6.2.9.Final"
uv run vdb --search "pkg:nuget/Microsoft.Data.SqlClient@5.0.1"
uv run vdb --search "pkg:nuget/Microsoft.IdentityModel.JsonWebTokens@6.21.0"
uv run vdb --search "pkg:nuget/System.Drawing.Common@5.0.0"
if: ${{ matrix.python-version == '3.13' && matrix.os == 'ubuntu-latest' }}