diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 12c5b7b2..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,60 +0,0 @@ -# Python CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-python/ for more details -# -version: 2 -jobs: - build: - docker: - # specify the version you desire here - # use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers` - - image: circleci/python:3.6.1-browsers - - # Specify service dependencies here if necessary - # CircleCI maintains a library of pre-built images - # documented at https://circleci.com/docs/2.0/circleci-images/ - - image: circleci/postgres:9.4 - environment: - POSTGRES_USER: postgres - POSTGRES_DB: fobi_tests - - working_directory: ~/repo - - steps: - - checkout - - # Download and cache dependencies - - restore_cache: - keys: - - v1-dependencies-{{ checksum "examples/requirements/django_3_0.txt" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - - run: - name: install dependencies - command: | - python3 -m venv venv - . venv/bin/activate - pip install --upgrade pip - python setup.py install - pip install -r examples/requirements/django_3_0.txt - - - save_cache: - paths: - - ./venv - key: v1-dependencies-{{ checksum "examples/requirements/django_3_0.txt" }} - - # run tests! - # this example uses Django's built-in test-runner - # other common Python testing frameworks include pytest and nose - # https://pytest.org - # https://nose.readthedocs.io - - run: - name: run tests - command: | - . venv/bin/activate - python runtests.py - - - store_artifacts: - path: test-reports - destination: test-reports \ No newline at end of file diff --git a/.coveragerc b/.coveragerc index 9e32161f..977f131c 100644 --- a/.coveragerc +++ b/.coveragerc @@ -8,6 +8,8 @@ omit = example/simple/settings/* example/simple/wsgi.py +relative_files = True + [report] exclude_lines = pragma: no cover diff --git a/.coveralls.yml b/.coveralls.yml index 91600595..1157ff25 100644 --- a/.coveralls.yml +++ b/.coveralls.yml @@ -1 +1 @@ -service_name: travis-ci +service_name: github-actions diff --git a/.env b/.env new file mode 100644 index 00000000..79cde8e1 --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +GITHUB_TOKEN +COVERALLS_REPO_TOKEN diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..869d3d2d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,98 @@ +name: test + +on: [push, pull_request] + +jobs: + test: + + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + include: + - python-version: 3.6 + requirements: django_2_2 + tox_env: py36-django22 + - python-version: 3.7 + requirements: django_2_2 + tox_env: py37-django22 + - python-version: 3.8 + requirements: django_2_2 + tox_env: py38-django22 + - python-version: 3.9 + requirements: django_2_2 + tox_env: py39-django22 + + - python-version: 3.6 + requirements: django_3_0 + tox_env: py36-django30 + - python-version: 3.7 + requirements: django_3_0 + tox_env: py37-django30 + - python-version: 3.8 + requirements: django_3_0 + tox_env: py38-django30 + - python-version: 3.9 + requirements: django_3_0 + tox_env: py39-django30 + + - python-version: 3.6 + requirements: django_3_1 + tox_env: py36-django31 + - python-version: 3.7 + requirements: django_3_1 + tox_env: py37-django31 + - python-version: 3.8 + requirements: django_3_1 + tox_env: py38-django31 + - python-version: 3.9 + requirements: django_3_1 + tox_env: py39-django31 + + - python-version: 3.6 + requirements: django_3_2 + tox_env: py36-django32 + - python-version: 3.7 + requirements: django_3_2 + tox_env: py37-django32 + - python-version: 3.8 + requirements: django_3_2 + tox_env: py38-django32 + - python-version: 3.9 + requirements: django_3_2 + tox_env: py39-django32 + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install pip-tools + pip-compile examples/requirements/${{ matrix.requirements }}.in + pip install -r examples/requirements/${{ matrix.requirements }}.txt + pip-compile examples/requirements/test.in + pip install -r examples/requirements/test.txt + - name: Run Tests + run: tox -e ${{ matrix.tox_env }} + - name: Coveralls + uses: AndreMiras/coveralls-python-action@develop + with: + parallel: true + flag-name: Run Tests + + coveralls_finish: + needs: test + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + GITHUB_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + uses: AndreMiras/coveralls-python-action@develop + with: + parallel-finished: true + debug: True