| 1 |
name: build |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- master |
| 7 |
pull_request: |
| 8 |
branches: |
| 9 |
- master |
| 10 |
schedule: |
| 11 |
- cron: 53 18 */10 * * |
| 12 |
|
| 13 |
jobs: |
| 14 |
code-quality: |
| 15 |
name: Code quality checks for CleverCSV |
| 16 |
runs-on: ubuntu-latest |
| 17 |
steps: |
| 18 |
- name: Checkout |
| 19 |
uses: actions/checkout@v3 |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
- name: Run black |
| 24 |
uses: psf/black@stable |
| 25 |
with: |
| 26 |
version: "23.3.0" |
| 27 |
|
| 28 |
- name: Run isort |
| 29 |
uses: jamescurtin/isort-action@master |
| 30 |
with: |
| 31 |
isortVersion: "5.12.0" |
| 32 |
|
| 33 |
- name: Run ruff |
| 34 |
uses: chartboost/ruff-action@v1 |
| 35 |
with: |
| 36 |
version: "v0.0.261" |
| 37 |
|
| 38 |
python-test: |
| 39 |
needs: [code-quality] |
| 40 |
name: Tests |
| 41 |
runs-on: ${{ matrix.os }} |
| 42 |
strategy: |
| 43 |
matrix: |
| 44 |
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ] |
| 45 |
py: [ '3.9', '3.14' ] |
| 46 |
steps: |
| 47 |
- name: Install Python ${{ matrix.py }} |
| 48 |
uses: actions/setup-python@v5 |
| 49 |
with: |
| 50 |
python-version: ${{ matrix.py }} |
| 51 |
|
| 52 |
- name: Checkout |
| 53 |
uses: actions/checkout@v3 |
| 54 |
|
| 55 |
- name: Install CleverCSV |
| 56 |
run: pip install -e .[full,tests] |
| 57 |
|
| 58 |
- name: Run unit tests |
| 59 |
run: python -m unittest discover -v -f -s ./tests/test_unit |