askrobots / dbbasic-content
Public
WordPress-style content management with block-based pages, stored as JSON files on disk instead of MySQL.
tests.yml · 866 bytes · 39 lines
| 1 | name: Tests |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: [ main, develop ] |
| 6 | pull_request: |
| 7 | branches: [ main ] |
| 8 | |
| 9 | jobs: |
| 10 | test: |
| 11 | runs-on: ubuntu-latest |
| 12 | strategy: |
| 13 | matrix: |
| 14 | python-version: ["3.8", "3.9", "3.10", "3.11"] |
| 15 | |
| 16 | steps: |
| 17 | - uses: actions/checkout@v3 |
| 18 | |
| 19 | - name: Set up Python ${{ matrix.python-version }} |
| 20 | uses: actions/setup-python@v4 |
| 21 | with: |
| 22 | python-version: ${{ matrix.python-version }} |
| 23 | |
| 24 | - name: Install dependencies |
| 25 | run: | |
| 26 | python -m pip install --upgrade pip |
| 27 | pip install pytest pytest-cov |
| 28 | pip install -e . |
| 29 | |
| 30 | - name: Run tests |
| 31 | run: | |
| 32 | pytest --cov=dbbasic_content --cov-report=xml --cov-report=term |
| 33 | |
| 34 | - name: Upload coverage |
| 35 | uses: codecov/codecov-action@v3 |
| 36 | if: matrix.python-version == '3.10' |
| 37 | with: |
| 38 | file: ./coverage.xml |
| 39 | fail_ci_if_error: false |