|
1 | 1 | # This workflow will install Python dependencies, run tests and lint |
2 | 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions |
3 | 3 |
|
4 | | -name: Test with Pre-commit |
| 4 | +name: Test |
5 | 5 |
|
6 | 6 | on: |
7 | 7 | push: |
|
10 | 10 | branches: [main] |
11 | 11 |
|
12 | 12 | jobs: |
13 | | - build: |
| 13 | + lint: |
14 | 14 | runs-on: ubuntu-latest |
| 15 | + continue-on-error: true |
| 16 | + |
| 17 | + steps: |
| 18 | + - name: Check out code from GitHub |
| 19 | + |
| 20 | + - name: Set up Python |
| 21 | + |
| 22 | + with: |
| 23 | + python-version: "3.11" |
| 24 | + - name: Install dependencies |
| 25 | + run: | |
| 26 | + python -m pip install --upgrade pip build setuptools |
| 27 | + pip install . .[test] |
| 28 | + - name: Lint/test with pre-commit |
| 29 | + run: pre-commit run --all-files |
| 30 | + |
| 31 | + test: |
| 32 | + runs-on: ubuntu-latest |
| 33 | + continue-on-error: true |
15 | 34 | strategy: |
| 35 | + fail-fast: false |
16 | 36 | matrix: |
17 | | - python-version: ["3.9", "3.10"] |
| 37 | + python-version: |
| 38 | + - "3.11" |
18 | 39 |
|
19 | 40 | steps: |
20 | | - |
| 41 | + - name: Check out code from GitHub |
| 42 | + |
21 | 43 | - name: Set up Python ${{ matrix.python-version }} |
22 | 44 | |
23 | 45 | with: |
24 | 46 | python-version: ${{ matrix.python-version }} |
25 | 47 | - name: Install dependencies |
26 | 48 | run: | |
27 | | - python -m pip install --upgrade pip |
28 | | - pip install -r requirements_dev.txt |
29 | | - pre-commit install-hooks |
30 | | - - name: Lint/test with pre-commit |
31 | | - run: pre-commit run --all-files |
| 49 | + python -m pip install --upgrade pip build setuptools |
| 50 | + pip install .[test] |
| 51 | + - name: Pytest |
| 52 | + run: pytest --durations 10 --cov-report term-missing --cov=aioslimproto --cov-report=xml tests/ |
0 commit comments