|
1 | 1 | name: python-slip10 |
2 | 2 |
|
3 | | -on: |
4 | | - push: |
5 | | - branches: [ master ] |
6 | | - pull_request: |
7 | | - branches: [ master ] |
| 3 | +on: [push, pull_request] |
8 | 4 |
|
9 | 5 | jobs: |
10 | | - tests: |
| 6 | + test: |
| 7 | + runs-on: ${{ matrix.os }} |
11 | 8 | strategy: |
12 | 9 | matrix: |
13 | | - python-version: ['3.9', '3.10'] |
14 | | - os: |
15 | | - - ubuntu-latest |
16 | | - - macOS-latest |
17 | | - - windows-latest |
18 | | - |
19 | | - runs-on: ${{ matrix.os }} |
| 10 | + os: [ ubuntu-latest ] |
| 11 | + python-version: ['3.8', '3.9', '3.10'] |
20 | 12 | steps: |
21 | | - - uses: actions/checkout@v2 |
22 | | - - name: Set up Python ${{ matrix.python-version }} |
23 | | - uses: actions/setup-python@v2 |
24 | | - with: |
25 | | - python-version: ${{ matrix.python-version }} |
26 | | - - name: Installation (deps and package) |
27 | | - run: | |
28 | | - python -m pip install --upgrade pip |
29 | | - pip install pytest |
30 | | - pip install -r requirements.txt -r tests/requirements.txt |
31 | | - python setup.py install |
32 | | - - name: Test with pytest |
33 | | - run: | |
34 | | - pytest -vvv |
| 13 | + - uses: actions/checkout@v4 |
| 14 | + - name: Install poetry |
| 15 | + run: pipx install poetry |
| 16 | + - name: Setup python for ${{ matrix.python-version }} |
| 17 | + uses: actions/setup-python@v5 |
| 18 | + with: |
| 19 | + python-version: ${{ matrix.python-version }} |
| 20 | + - name: Install dependencies |
| 21 | + run: poetry install |
| 22 | + - name: Run tests for Python-${{ matrix.python-version }} with ${{ matrix.os }} |
| 23 | + run: poetry run pytest |
35 | 24 |
|
36 | 25 | linter: |
37 | 26 | runs-on: ubuntu-latest |
38 | 27 | steps: |
39 | | - - uses: actions/checkout@v2 |
40 | | - - name: Set up Python 3.9 |
41 | | - uses: actions/setup-python@v2 |
42 | | - with: |
43 | | - python-version: 3.9 |
44 | | - - name: Run `black` on the source code |
45 | | - run: | |
46 | | - python -m pip install --upgrade pip |
47 | | - pip install black |
48 | | - python -m black --check slip10 tests |
49 | | -
|
50 | | - coincurve_versions: |
51 | | - strategy: |
52 | | - matrix: |
53 | | - coincurve-version: [15, 16, 17] |
54 | | - |
55 | | - runs-on: ubuntu-latest |
56 | | - steps: |
57 | | - - uses: actions/checkout@v2 |
58 | | - - name: Set up Python 3.10 |
59 | | - uses: actions/setup-python@v2 |
60 | | - with: |
61 | | - python-version: '3.10' |
62 | | - - name: Testing with Coincurve ${{ matrix.coincurve-version }} |
63 | | - run: | |
64 | | - python -m pip install --upgrade pip |
65 | | - pip install pytest |
66 | | - pip install -r requirements.txt -r tests/requirements.txt |
67 | | - pip install -I coincurve==${{ matrix.coincurve-version }} |
68 | | - python setup.py install |
| 28 | + - uses: actions/checkout@v4 |
| 29 | + - name: Install poetry |
| 30 | + run: pipx install poetry |
| 31 | + - name: Setup python for ${{ matrix.python-version }} |
| 32 | + uses: actions/setup-python@v5 |
| 33 | + with: |
| 34 | + python-version: 3.9 |
| 35 | + - name: Install dependencies |
| 36 | + run: poetry install --only=dev |
| 37 | + - name: Run style check |
| 38 | + run: poetry run make style_check |
0 commit comments