|
| 1 | +name: testing |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: master |
| 6 | + pull_request: |
| 7 | + |
| 8 | +jobs: |
| 9 | + sanity: |
| 10 | + name: sanity / ${{ matrix.toxenv }} |
| 11 | + runs-on: ubuntu-latest |
| 12 | + strategy: |
| 13 | + fail-fast: false |
| 14 | + matrix: |
| 15 | + python-version: [3.6] |
| 16 | + toxenv: [django_not_installed, django_is_installed, flake8, pylint, readme] |
| 17 | + |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v2 |
| 20 | + - name: Set up Python ${{ matrix.python-version }} |
| 21 | + uses: actions/setup-python@v1 |
| 22 | + with: |
| 23 | + python-version: ${{ matrix.python-version }} |
| 24 | + |
| 25 | + - name: Execute tests |
| 26 | + run: | |
| 27 | + pip install tox |
| 28 | + pip install -e .[for_tests] |
| 29 | +
|
| 30 | + export TOXENV=${{ matrix.toxenv }} |
| 31 | + export PYTHON=${{ matrix.python-version }} |
| 32 | + tox |
| 33 | +
|
| 34 | +
|
| 35 | + test: |
| 36 | + name: test / Django@${{ matrix.django-version }} / Python@${{ matrix.python-version }} |
| 37 | + runs-on: ubuntu-latest |
| 38 | + strategy: |
| 39 | + fail-fast: false |
| 40 | + matrix: |
| 41 | + python-version: [3.6, 3.7, 3.8, 3.9] |
| 42 | + django-version: [master, 3.2, 3.1, 3.0, 2.0, 1.11] |
| 43 | + |
| 44 | + steps: |
| 45 | + - uses: actions/checkout@v2 |
| 46 | + - name: Set up Python ${{ matrix.python-version }} |
| 47 | + uses: actions/setup-python@v1 |
| 48 | + with: |
| 49 | + python-version: ${{ matrix.python-version }} |
| 50 | + |
| 51 | + - name: Execute tests |
| 52 | + run: | |
| 53 | + pip install tox |
| 54 | + pip install -e .[for_tests] |
| 55 | +
|
| 56 | + export DJANGO=${{ matrix.django-version }} |
| 57 | + export PYTHON=${{ matrix.python-version }} |
| 58 | + tox |
| 59 | +
|
| 60 | + - name: Coveralls |
| 61 | + uses: coverallsapp/github-action@master |
| 62 | + with: |
| 63 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 64 | + |
| 65 | + build_and_package_sanity: |
| 66 | + runs-on: ubuntu-latest |
| 67 | + strategy: |
| 68 | + matrix: |
| 69 | + python-version: [3.6] |
| 70 | + |
| 71 | + steps: |
| 72 | + - uses: actions/checkout@v2 |
| 73 | + - name: Set up Python ${{ matrix.python-version }} |
| 74 | + uses: actions/setup-python@v1 |
| 75 | + with: |
| 76 | + python-version: ${{ matrix.python-version }} |
| 77 | + |
| 78 | + - name: Build |
| 79 | + run: | |
| 80 | + pip install tox |
| 81 | + pip install -e .[for_tests] |
| 82 | +
|
| 83 | + ./scripts/build.sh |
0 commit comments