|
| 1 | +name: build |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + flake8-linter: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + steps: |
| 9 | + - uses: actions/checkout@v1 |
| 10 | + - uses: grantmcconnaughey/lintly-flake8-github-action@v1.0 |
| 11 | + if: github.event_name == 'pull_request' |
| 12 | + with: |
| 13 | + # The GitHub API token to create reviews with |
| 14 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 15 | + # Fail if "new" violations detected or "any", default "new" |
| 16 | + failIf: any |
| 17 | + # Additional arguments to pass to flake8, default "." (current directory) |
| 18 | + args: "--extend-exclude=migrations ." |
| 19 | + build: |
| 20 | + runs-on: ubuntu-latest |
| 21 | + strategy: |
| 22 | + fail-fast: true |
| 23 | + matrix: |
| 24 | + python-version: ['3.6', '3.7', '3.8'] |
| 25 | + django-version: ['1.11', '2.0', '2.1', '2.2', '3.0'] |
| 26 | + drf-version: ['3.9', '3.10', '3.11'] |
| 27 | + include: |
| 28 | + - python-version: '2.7' |
| 29 | + django-version: '1.11' |
| 30 | + drf-version: '3.9' |
| 31 | + exclude: |
| 32 | + - django-version: '3.0' |
| 33 | + drf-version: '3.9' |
| 34 | + steps: |
| 35 | + - uses: actions/checkout@v2 |
| 36 | + - name: Set up Python ${{ matrix.python-version }} |
| 37 | + uses: actions/setup-python@v1 |
| 38 | + with: |
| 39 | + python-version: ${{ matrix.python-version }} |
| 40 | + - name: Install Dependencies |
| 41 | + run: | |
| 42 | + python -m pip install --upgrade pip |
| 43 | + echo "Python ${{ matrix.python-version }} -> Django ${{ matrix.django-version }} -> DRF ${{ matrix.drf-version }}" |
| 44 | + python -m pip install "Django~=${{ matrix.django-version }}.0" |
| 45 | + python -m pip install "djangorestframework~=${{ matrix.drf-version }}.0" |
| 46 | + echo "Django: `django-admin --version`" |
| 47 | + python --version |
| 48 | + - name: Run Tests |
| 49 | + run: | |
| 50 | + python example/manage.py test tests -v 1 --noinput |
0 commit comments