|
1 | 1 | # This workflow will install Python dependencies, run tests and lint. |
2 | 2 | # For more information see: https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-python |
3 | 3 |
|
4 | | -# name: Test Python application |
| 4 | +name: Test Curo Python Library |
5 | 5 |
|
6 | | -# on: |
7 | | -# push: |
8 | | -# branches: [ "main", "master" ] |
9 | | -# pull_request: |
10 | | -# branches: [ "main", "master" ] |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: [ "main", "master" ] |
| 9 | + pull_request: |
| 10 | + branches: [ "main", "master" ] |
11 | 11 |
|
12 | | -# permissions: |
13 | | -# contents: read |
| 12 | +permissions: |
| 13 | + contents: read |
14 | 14 |
|
15 | | -# jobs: |
16 | | -# build: |
17 | | -# strategy: |
18 | | -# matrix: |
19 | | -# # Test all supported Python versions under Ubuntu |
20 | | -# os: [ubuntu-latest] |
21 | | -# python-version: ['3.12', '3.13'] |
| 15 | +jobs: |
| 16 | + build: |
| 17 | + strategy: |
| 18 | + matrix: |
| 19 | + # Test all supported Python versions under Ubuntu |
| 20 | + os: [ubuntu-latest] |
| 21 | + python-version: ['3.12', '3.13'] |
22 | 22 |
|
23 | | -# runs-on: ${{ matrix.os }} |
| 23 | + runs-on: ${{ matrix.os }} |
24 | 24 |
|
25 | | -# steps: |
26 | | -# - uses: actions/checkout@v4 |
27 | | -# - name: Set up Python ${{ matrix.python-version }} |
28 | | -# uses: actions/setup-python@v5 |
29 | | -# with: |
30 | | -# python-version: ${{ matrix.python-version }} |
31 | | -# - name: Install dependencies |
32 | | -# run: | |
33 | | -# python -m pip install --upgrade pip |
34 | | -# pip install -r requirements_dev.txt |
35 | | -# - name: Lint with ruff |
36 | | -# run: | |
37 | | -# # stop the build if there are Python syntax errors or undefined names |
38 | | -# ruff check --select=E9,F63,F7,F82 |
39 | | -# # exit-zero treats all errors as warnings |
40 | | -# ruff check --exit-zero --statistics |
41 | | -# - name: Install project |
42 | | -# run: | |
43 | | -# pip install . |
44 | | -# - name: Run tests |
45 | | -# run: | |
46 | | -# pytest |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v4 |
| 27 | + - name: Set up Python ${{ matrix.python-version }} |
| 28 | + uses: actions/setup-python@v5 |
| 29 | + with: |
| 30 | + python-version: ${{ matrix.python-version }} |
| 31 | + - name: Install dependencies |
| 32 | + run: | |
| 33 | + python -m pip install --upgrade pip |
| 34 | + pip install -r requirements_dev.txt |
| 35 | + - name: Lint with ruff |
| 36 | + run: | |
| 37 | + # stop the build if there are Python syntax errors or undefined names |
| 38 | + ruff check --select=E9,F63,F7,F82 |
| 39 | + # exit-zero treats all errors as warnings |
| 40 | + ruff check --exit-zero --statistics |
| 41 | + - name: Install project |
| 42 | + run: | |
| 43 | + pip install . |
| 44 | + - name: Run tests |
| 45 | + run: | |
| 46 | + pytest |
0 commit comments