diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..6b26242 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ +### Overview +A few sentences or bullet points describing the overall goals and what changed. + +### How to test +- [ ] Step 1 to test the changes you made +- [ ] Step 2 to test the changes you made + diff --git a/.github/workflows/canceller.yml b/.github/workflows/canceller.yml new file mode 100644 index 0000000..9808fbd --- /dev/null +++ b/.github/workflows/canceller.yml @@ -0,0 +1,18 @@ +name: Cancelling Duplicates +on: + workflow_run: + workflows: + - "Test Suite" + types: [ "requested" ] + +jobs: + cancel-duplicate-workflow-runs: + name: "Cancel duplicate workflow runs" + runs-on: ubuntu-latest + steps: + - uses: potiuk/cancel-workflow-runs@master + name: "Cancel duplicate workflow runs" + with: + cancelMode: allDuplicates + token: ${{ secrets.GITHUB_TOKEN }} + sourceRunId: ${{ github.event.workflow_run.id }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..8d94fcd --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,71 @@ +name: Test Suite # IMPORTANT: If this name changes you need to update the canceller.yml + +# Controls when the action will run. +on: + # Triggers the workflow on push for the master branch. + push: + branches: [ master ] + + # Triggers the workflow on pull request for any branch. + pull_request: + + # Allows you to run this workflow manually from the Actions tab. + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-18.04 + services: + redis: + image: redis + ports: + - 6379:6379 + # Set health checks to wait until redis has started + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + strategy: + matrix: + python-version: [ 2.7, 3.4, 3.5, 3.6, 3.7 ] + django-version: [ 1.8.*, 1.9.*, 1.10.*, 1.11.*, 2.0.*, 2.1.*, 2.2.*, 3.0.* ] + exclude: + - python-version: 2.7 + django-version: 2.0.* + - python-version: 2.7 + django-version: 2.1.* + - python-version: 2.7 + django-version: 2.2.* + - python-version: 2.7 + django-version: 3.0.* + - python-version: 3.4 + django-version: 2.1.* + - python-version: 3.4 + django-version: 2.2.* + - python-version: 3.4 + django-version: 3.0.* + - python-version: 3.5 + django-version: 3.0.* + steps: + # Checks-out the repository. + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install -r dev_requirements.txt + pip install -q Django==${{ matrix.django-version }} + + - name: Install Cache Helper Package + run: pip install -e . + + - name: Run tests + run: python manage.py test + working-directory: ./test_project diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fa96fda..0000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: python -python: - - 2.7 - - 3.4 - - 3.5 -services: - - redis-server -env: - - DJANGO_VERSION=1.8.19 - - DJANGO_VERSION=1.9.13 - - DJANGO_VERSION=1.10.8 - - DJANGO_VERSION=1.11.24 - - DJANGO_VERSION=2.0.13 -matrix: - exclude: - - python: 2.7 - env: DJANGO_VERSION=2.0.13 -install: - # Install requirements - - pip install -r requirements.txt - # Install dev requirements for testing - - pip install -r dev_requirements.txt - # Install correct django version - - pip install Django==$DJANGO_VERSION - # Install autocompleter - - pip install -e . -script: - - python test_project/manage.py test diff --git a/setup.py b/setup.py index d2f0fec..16ac558 100644 --- a/setup.py +++ b/setup.py @@ -2,11 +2,11 @@ setup( name='django-autocompleter', - version="0.10.0", + version='0.10.0', description='A redis-backed autocompletor for Django projects', author='Ara Anjargolian', author_email='ara818@gmail.com', - url='http://github.com/ara818/django-autocompleter', + url='http://github.com/ycharts/django-autocompleter', packages=['autocompleter', 'autocompleter.management', 'autocompleter.management.commands'], install_requires=['setuptools', 'redis'], classifiers=[