|
| 1 | +name: CI |
| 2 | +on: |
| 3 | + push: |
| 4 | + workflow_dispatch: |
| 5 | + schedule: |
| 6 | + - cron: '0 1 * * *' |
| 7 | +jobs: |
| 8 | + Format: |
| 9 | + runs-on: ubuntu-latest |
| 10 | + steps: |
| 11 | + - uses: actions/checkout@v3 |
| 12 | + - name: Install Python |
| 13 | + uses: actions/setup-python@v4 |
| 14 | + with: |
| 15 | + python-version: '3.10' |
| 16 | + - run: python -m pip install tox |
| 17 | + - run: tox -e checkformatting |
| 18 | + Lint: |
| 19 | + runs-on: ubuntu-latest |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v3 |
| 22 | + - name: Install Python |
| 23 | + uses: actions/setup-python@v4 |
| 24 | + with: |
| 25 | + python-version: '3.10' |
| 26 | + - run: python -m pip install tox |
| 27 | + - run: tox -e lint |
| 28 | + Tests: |
| 29 | + runs-on: ubuntu-latest |
| 30 | + strategy: |
| 31 | + matrix: |
| 32 | + python-version: ['3.10', '3.9', '3.8'] |
| 33 | + name: Unit tests with Python ${{ matrix.python-version }} |
| 34 | + steps: |
| 35 | + - uses: actions/checkout@v3 |
| 36 | + - name: Install Python |
| 37 | + uses: actions/setup-python@v4 |
| 38 | + with: |
| 39 | + python-version: ${{ matrix.python-version }} |
| 40 | + - run: python -m pip install tox |
| 41 | + - run: tox -e tests |
| 42 | + - name: Upload coverage file |
| 43 | + uses: actions/upload-artifact@v3 |
| 44 | + with: |
| 45 | + name: coverage |
| 46 | + path: .coverage.* |
| 47 | + Coverage: |
| 48 | + needs: tests |
| 49 | + runs-on: ubuntu-latest |
| 50 | + steps: |
| 51 | + - uses: actions/checkout@v3 |
| 52 | + - name: Install Python |
| 53 | + uses: actions/setup-python@v4 |
| 54 | + with: |
| 55 | + python-version: '3.10' |
| 56 | + - name: Download coverage files |
| 57 | + uses: actions/download-artifact@v3 |
| 58 | + with: |
| 59 | + name: coverage |
| 60 | + - run: python -m pip install tox |
| 61 | + - run: tox -e coverage |
| 62 | + Functests: |
| 63 | + runs-on: ubuntu-latest |
| 64 | + strategy: |
| 65 | + matrix: |
| 66 | + python-version: ['3.10', '3.9', '3.8'] |
| 67 | + name: Functional tests with Python ${{ matrix.python-version }} |
| 68 | + steps: |
| 69 | + - uses: actions/checkout@v3 |
| 70 | + - name: Install Python |
| 71 | + uses: actions/setup-python@v4 |
| 72 | + with: |
| 73 | + python-version: ${{ matrix.python-version }} |
| 74 | + - run: python -m pip install tox |
| 75 | + - run: tox -e functests |
0 commit comments