|
| 1 | +name: Push |
| 2 | +on: [push] |
| 3 | + |
| 4 | +jobs: |
| 5 | + test: |
| 6 | + strategy: |
| 7 | + fail-fast: false |
| 8 | + matrix: |
| 9 | + python-version: ['3.11', '3.12'] |
| 10 | + poetry-version: ['1.8.3'] |
| 11 | + os: [ubuntu-latest] |
| 12 | + runs-on: ${{ matrix.os }} |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@v4 |
| 15 | + - uses: actions/setup-python@v5 |
| 16 | + with: |
| 17 | + python-version: ${{ matrix.python-version }} |
| 18 | + - name: Run image |
| 19 | + uses: abatilo/actions-poetry@v2 |
| 20 | + with: |
| 21 | + poetry-version: ${{ matrix.poetry-version }} |
| 22 | + - name: Install dependencies |
| 23 | + run: poetry install |
| 24 | + - name: Run tests |
| 25 | + run: poetry run pytest --cov=./ --cov-report=xml |
| 26 | + - name: Upload coverage to Codecov |
| 27 | + uses: codecov/codecov-action@v4 |
| 28 | + code-quality: |
| 29 | + strategy: |
| 30 | + fail-fast: false |
| 31 | + matrix: |
| 32 | + python-version: ['3.11', '3.12'] |
| 33 | + poetry-version: ['1.8.3'] |
| 34 | + os: [ubuntu-latest] |
| 35 | + runs-on: ${{ matrix.os }} |
| 36 | + steps: |
| 37 | + - uses: actions/checkout@v4 |
| 38 | + - uses: actions/setup-python@v5 |
| 39 | + with: |
| 40 | + python-version: ${{ matrix.python-version }} |
| 41 | + - name: Run image |
| 42 | + uses: abatilo/actions-poetry@v2 |
| 43 | + with: |
| 44 | + poetry-version: ${{ matrix.poetry-version }} |
| 45 | + - name: Install dependencies |
| 46 | + run: poetry install |
| 47 | + - name: Run ruff |
| 48 | + run: poetry run ruff check . |
| 49 | + - name: Run mypy |
| 50 | + run: poetry run mypy . |
| 51 | + - name: Run bandit |
| 52 | + run: poetry run bandit . |
| 53 | + - name: Run safety |
| 54 | + run: poetry run safety check -i 70612 |
| 55 | + - name: Check for acceptable licenses |
| 56 | + run: poetry run pip-licenses --allow-only="MIT License;BSD License;Python Software Foundation License;Apache Software License;Mozilla Public License 2.0 (MPL 2.0);ISC License (ISCL);The Unlicense (Unlicense)" |
0 commit comments