mirror of
https://github.com/Hopiu/django-select2.git
synced 2026-03-23 00:30:24 +00:00
98 lines
2.5 KiB
YAML
98 lines
2.5 KiB
YAML
name: CI
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
|
|
jobs:
|
|
|
|
flake8:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/setup-python@v1
|
|
- uses: actions/checkout@v1
|
|
- run: python -m pip install flake8
|
|
- run: flake8
|
|
|
|
isort:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/setup-python@v1
|
|
- uses: actions/checkout@v1
|
|
- run: python -m pip install isort
|
|
- run: isort --check-only --diff --recursive .
|
|
|
|
pydocstyle:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/setup-python@v1
|
|
- uses: actions/checkout@v1
|
|
- run: python -m pip install pydocstyle
|
|
- run: pydocstyle .
|
|
|
|
black:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/setup-python@v1
|
|
- uses: actions/checkout@v1
|
|
- run: python -m pip install black
|
|
- run: black --check --diff .
|
|
|
|
standardjs:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '12.x'
|
|
- run: npm install -g standard
|
|
- run: standard
|
|
|
|
docs:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/setup-python@v1
|
|
- uses: actions/checkout@v1
|
|
- run: sudo apt-get install -y gettext aspell libenchant-dev graphviz
|
|
- run: python setup.py develop
|
|
- run: python setup.py build_sphinx -W -b doctest -b html
|
|
|
|
pytest:
|
|
needs:
|
|
- isort
|
|
- pydocstyle
|
|
- standardjs
|
|
strategy:
|
|
matrix:
|
|
python-version:
|
|
- "3.6"
|
|
- "3.7"
|
|
- "3.8"
|
|
django-version:
|
|
- "2.2"
|
|
- "3.0"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- name: Install Chrome
|
|
run: sudo apt-get install -y google-chrome-stable
|
|
- name: Install Selenium
|
|
run: |
|
|
mkdir bin
|
|
curl -O https://chromedriver.storage.googleapis.com/77.0.3865.40/chromedriver_linux64.zip
|
|
unzip chromedriver_linux64.zip -d bin
|
|
- uses: actions/checkout@v1
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip setuptools wheel codecov
|
|
pip install -e .[test]
|
|
pip install django~=${{ matrix.django-version }}
|
|
- name: Run tests
|
|
run: PATH=$PATH:$(pwd)/bin py.test
|
|
- run: codecov
|
|
env:
|
|
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
|