forked from spdx/tools-python
-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (29 loc) · 1.03 KB
/
install_and_test.yml
File metadata and controls
32 lines (29 loc) · 1.03 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
name: Install and Test
on: [ workflow_dispatch, pull_request ]
jobs:
install_and_test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Installation
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools wheel setuptools_scm build
python -m build -nwx .
python -m pip install --upgrade ./dist/*.whl
python -m pip install pytest
shell: bash
- name: Run tests
run: pytest
- name: Run CLI
run: |
pyspdxtools_parser --file ./tests/data/formats/SPDXJSONExample-v2.3.spdx.json
pyspdxtools_convertor --infile ./tests/data/formats/SPDXTagExample-v2.3.spdx -o temp.json