| 1 |
name: Run test |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- master |
| 7 |
pull_request: |
| 8 |
|
| 9 |
jobs: |
| 10 |
lint: |
| 11 |
runs-on: ubuntu-latest |
| 12 |
steps: |
| 13 |
- uses: actions/checkout@v4 |
| 14 |
- name: Install Ruff |
| 15 |
run: pipx install ruff |
| 16 |
- name: Ruff check |
| 17 |
run: ruff check |
| 18 |
- name: Ruff format |
| 19 |
run: ruff format --diff |
| 20 |
|
| 21 |
test: |
| 22 |
runs-on: ubuntu-latest |
| 23 |
strategy: |
| 24 |
matrix: |
| 25 |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.9", "pypy3.10"] |
| 26 |
steps: |
| 27 |
- uses: actions/checkout@v4 |
| 28 |
- name: Set up Python |
| 29 |
uses: actions/setup-python@v5 |
| 30 |
with: |
| 31 |
python-version: ${{ matrix.python-version }} |
| 32 |
cache: "pip" |
| 33 |
cache-dependency-path: requirements-dev.txt |
| 34 |
- name: Install dependencies |
| 35 |
run: python -m pip install -r requirements-dev.txt |
| 36 |
- name: Run tests |
| 37 |
run: pytest --cov=fluent |
| 38 |
|
| 39 |
build: |
| 40 |
needs: test |
| 41 |
runs-on: ubuntu-latest |
| 42 |
steps: |
| 43 |
- uses: actions/checkout@v4 |
| 44 |
- run: pipx run build |
| 45 |
- uses: actions/upload-artifact@v4 |
| 46 |
with: |
| 47 |
name: dist |
| 48 |
path: dist/ |