forked from interledger/open-payments-python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (53 loc) · 1.65 KB
/
Copy pathtest.yml
File metadata and controls
63 lines (53 loc) · 1.65 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
name: Test Python open payments sdk
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.10","3.11","3.12","3.13"]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Setup Poetry on Windows
if: runner.os == 'Windows'
run: |
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
echo $env:APPDATA\Python\Scripts
dir $env:APPDATA\Python\Scripts
echo "$env:APPDATA\Python\Scripts" >> $env:GITHUB_PATH
poetry config virtualenvs.create false
- name: Setup Poetry on Ubuntu
if: runner.os != 'Windows'
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
poetry config virtualenvs.create false
- name: Install dependencies
run: |
poetry install --no-interaction --no-root
poetry install --only dev
- name: Run Unit Tests
run: |
poetry run pytest tests/unit/
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
python3 -m pip install . # assumes dependencies declared in pyproject.toml
python3 -m pip install pip-audit
- name: Run pip-audit
run: pip-audit .