|
| 1 | +name: CI |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - master |
| 6 | + pull_request: |
| 7 | + |
| 8 | +jobs: |
| 9 | + |
| 10 | + flake8: |
| 11 | + runs-on: ubuntu-latest |
| 12 | + steps: |
| 13 | + - uses: actions/setup-python@v1 |
| 14 | + - uses: actions/checkout@v1 |
| 15 | + - run: python -m pip install flake8 |
| 16 | + - run: flake8 |
| 17 | + |
| 18 | + isort: |
| 19 | + runs-on: ubuntu-latest |
| 20 | + steps: |
| 21 | + - uses: actions/setup-python@v1 |
| 22 | + - uses: actions/checkout@v1 |
| 23 | + - run: python -m pip install isort |
| 24 | + - run: isort --check-only --diff --recursive . |
| 25 | + |
| 26 | + pydocstyle: |
| 27 | + runs-on: ubuntu-latest |
| 28 | + steps: |
| 29 | + - uses: actions/setup-python@v1 |
| 30 | + - uses: actions/checkout@v1 |
| 31 | + - run: python -m pip install pydocstyle |
| 32 | + - run: pydocstyle . |
| 33 | + |
| 34 | + dist: |
| 35 | + runs-on: ubuntu-latest |
| 36 | + steps: |
| 37 | + - uses: actions/setup-python@v1 |
| 38 | + - run: python -m pip install --upgrade pip setuptools wheel twine readme-renderer |
| 39 | + - uses: actions/checkout@v2 |
| 40 | + - run: python setup.py sdist bdist_wheel |
| 41 | + - run: python -m twine check dist/* |
| 42 | + |
| 43 | + standardjs: |
| 44 | + runs-on: ubuntu-latest |
| 45 | + steps: |
| 46 | + - uses: actions/checkout@v1 |
| 47 | + - uses: actions/setup-node@v1 |
| 48 | + with: |
| 49 | + node-version: '12.x' |
| 50 | + - run: npm install -g standard |
| 51 | + - run: standard |
| 52 | + |
| 53 | + docs: |
| 54 | + runs-on: ubuntu-latest |
| 55 | + steps: |
| 56 | + - uses: actions/setup-python@v1 |
| 57 | + - uses: actions/checkout@v1 |
| 58 | + - run: sudo apt-get install -y gettext graphviz |
| 59 | + - run: python setup.py develop |
| 60 | + - run: python setup.py build_sphinx -W -b doctest -b html |
| 61 | + |
| 62 | + pytest: |
| 63 | + needs: |
| 64 | + - isort |
| 65 | + - pydocstyle |
| 66 | + - standardjs |
| 67 | + - flake8 |
| 68 | + strategy: |
| 69 | + matrix: |
| 70 | + python-version: |
| 71 | + - "3.6" |
| 72 | + - "3.7" |
| 73 | + - "3.8" |
| 74 | + django-version: |
| 75 | + - "2.2" |
| 76 | + - "3.0" |
| 77 | + runs-on: ubuntu-latest |
| 78 | + steps: |
| 79 | + - name: Set up Python ${{ matrix.python-version }} |
| 80 | + uses: actions/setup-python@v1 |
| 81 | + with: |
| 82 | + python-version: ${{ matrix.python-version }} |
| 83 | + - name: Install Chrome |
| 84 | + run: sudo apt-get install -y google-chrome-stable |
| 85 | + - name: Install Selenium |
| 86 | + run: | |
| 87 | + mkdir bin |
| 88 | + curl -O https://chromedriver.storage.googleapis.com/77.0.3865.40/chromedriver_linux64.zip |
| 89 | + unzip chromedriver_linux64.zip -d bin |
| 90 | + - uses: actions/checkout@v1 |
| 91 | + - name: Install dependencies |
| 92 | + run: | |
| 93 | + python -m pip install --upgrade pip setuptools wheel codecov |
| 94 | + pip install -e .[test] |
| 95 | + pip install django~=${{ matrix.django-version }} |
| 96 | + - name: Run tests |
| 97 | + run: PATH=$PATH:$(pwd)/bin py.test |
| 98 | + - run: codecov |
| 99 | + env: |
| 100 | + CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} |
0 commit comments