|
| 1 | +name: Lint |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ master ] |
| 6 | + pull_request: |
| 7 | + branches: [ master ] |
| 8 | + |
| 9 | +jobs: |
| 10 | + check-commits: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + steps: |
| 13 | + - uses: actions/checkout@v3 |
| 14 | + - uses: webiny/action-conventional-commits@v1.0.3 |
| 15 | + |
| 16 | + check-linting: |
| 17 | + runs-on: ubuntu-latest |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v3 |
| 20 | + - name: Set up Python 3.10 |
| 21 | + uses: actions/setup-python@v3 |
| 22 | + with: |
| 23 | + python-version: "3.10" |
| 24 | + - name: Install dependencies |
| 25 | + run: | |
| 26 | + python -m pip install --upgrade pip |
| 27 | + python -m pip install tox |
| 28 | + - name: Check linting, formatting |
| 29 | + run: | |
| 30 | + tox -e check |
| 31 | +
|
| 32 | + check-docs: |
| 33 | + runs-on: ubuntu-latest |
| 34 | + needs: |
| 35 | + - check-commits |
| 36 | + - check-linting |
| 37 | + steps: |
| 38 | + - uses: actions/checkout@v3 |
| 39 | + - name: Set up Python 3.10 |
| 40 | + uses: actions/setup-python@v3 |
| 41 | + with: |
| 42 | + python-version: "3.10" |
| 43 | + - name: Install dependencies |
| 44 | + run: | |
| 45 | + python -m pip install --upgrade pip |
| 46 | + python -m pip install tox |
| 47 | + - name: Check documentation build |
| 48 | + run: | |
| 49 | + tox -e docs |
| 50 | +
|
| 51 | + test: |
| 52 | + runs-on: ubuntu-latest |
| 53 | + strategy: |
| 54 | + fail-fast: false |
| 55 | + matrix: |
| 56 | + python-version: ["3.7", "3.8", "3.9", "3.10"] |
| 57 | + needs: |
| 58 | + - check-commits |
| 59 | + - check-linting |
| 60 | + steps: |
| 61 | + - uses: actions/checkout@v3 |
| 62 | + - name: Set up Python ${{ matrix.python-version }} |
| 63 | + uses: actions/setup-python@v3 |
| 64 | + with: |
| 65 | + python-version: ${{ matrix.python-version }} |
| 66 | + - uses: docker-practice/actions-setup-docker@master |
| 67 | + - name: Install dependencies |
| 68 | + run: | |
| 69 | + python -m pip install --upgrade pip |
| 70 | + python -m pip install tox |
| 71 | + - name: Run tests |
| 72 | + run: | |
| 73 | + tox -e tests |
| 74 | +
|
| 75 | + build: |
| 76 | + runs-on: ubuntu-latest |
| 77 | + needs: test |
| 78 | + steps: |
| 79 | + - uses: actions/checkout@v3 |
| 80 | + - name: Set up Python 3.10 |
| 81 | + uses: actions/setup-python@v3 |
| 82 | + with: |
| 83 | + python-version: "3.10" |
| 84 | + - name: Install dependencies |
| 85 | + run: | |
| 86 | + python -m pip install --upgrade pip |
| 87 | + python -m pip install tox |
| 88 | + - name: Run build |
| 89 | + run: | |
| 90 | + tox -e build |
0 commit comments