-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add django 3.2 testing support
- Loading branch information
1 parent
3d96586
commit f4261b4
Showing
25 changed files
with
615 additions
and
313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- '**' | ||
jobs: | ||
python-tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-20.04 ] | ||
python-version: [ '3.8' ] | ||
toxenv: [ django22, django30, django31, django32 ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Python setup | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Set up test environment | ||
run: | | ||
sudo apt-get install xvfb | ||
wget https://github.com/mozilla/geckodriver/releases/download/v0.15.0/geckodriver-v0.15.0-linux64.tar.gz | ||
mkdir geckodriver | ||
tar -xzf geckodriver-v0.15.0-linux64.tar.gz -C geckodriver | ||
export PATH=$PATH:$(pwd)/geckodriver | ||
export BOTO_CONFIG=/dev/null | ||
- name: Install Requirements | ||
run: | | ||
pip install -r requirements/pip.txt | ||
pip install -r requirements/ci.txt | ||
- name: Run Tests | ||
run: xvfb-run --server-args=-ac -- tox -e ${{ matrix.toxenv }} | ||
|
||
- name: Upload coverage to CodeCov | ||
if: matrix.python-version == '3.8' && matrix.toxenv == 'django32' | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: ./coverage.xml | ||
fail_ci_if_error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Push Docker Images | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
# Push image to GitHub Packages. | ||
# See also https://docs.docker.com/docker-hub/builds/ | ||
push: | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build and Push docker image | ||
env: | ||
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | ||
run : make travis_docker_push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Publish package to PyPi | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
|
||
push: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install pip | ||
run: pip install -r requirements/pip.txt | ||
|
||
- name: Build package | ||
run: python setup.py sdist bdist_wheel | ||
|
||
- name: Publish to PyPi | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_UPLOAD_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,52 @@ | ||
dist: latest | ||
language: python | ||
python: | ||
- 3.8 | ||
- '3.8' | ||
env: | ||
matrix: | ||
- TOXENV=django22 | ||
- TOXENV=django30 | ||
- TOXENV=django22 | ||
- TOXENV=django30 | ||
- TOXENV=django31 | ||
- TOXENV=django32 | ||
global: | ||
- DOCKER_USERNAME=edxbuilder | ||
- DOCKER_USERNAME=edxbuilder | ||
# encrypted DOCKER_PASSWORD | ||
- secure: JWmtldloBZLU/+M3FlKaVGM9Kn3jMa4RTGGB84P2VIDMoCeKk6JBgdYLvt8LXx8bLV5/1JcBL+oNOWGWE7SL/AhfTKXwGq1FYdt9Nu8UqtscfIEbzBwT0MdLZtfOHqS7c7MP0ViKIcOcyj7o+vpuauJVx6MGgAzBhFH6QlVQLZU= | ||
- secure: ZAQze5XdSm8VEdmMdpXIxF8y163XbbnsDw+06ue5yYG41OGKcZW0u92CgzuKyjaamKJFPfST05ap9L/AxYjJ7A7bmYBUeMyMkIuHMPeJ1XOtMEtsb2x3hV5x2Z3kjxUCD/YYExDTvoGqcEbNamGZLkGPI+hJ+WXSGzw9OXqztF8= | ||
- secure: JWmtldloBZLU/+M3FlKaVGM9Kn3jMa4RTGGB84P2VIDMoCeKk6JBgdYLvt8LXx8bLV5/1JcBL+oNOWGWE7SL/AhfTKXwGq1FYdt9Nu8UqtscfIEbzBwT0MdLZtfOHqS7c7MP0ViKIcOcyj7o+vpuauJVx6MGgAzBhFH6QlVQLZU= | ||
- secure: ZAQze5XdSm8VEdmMdpXIxF8y163XbbnsDw+06ue5yYG41OGKcZW0u92CgzuKyjaamKJFPfST05ap9L/AxYjJ7A7bmYBUeMyMkIuHMPeJ1XOtMEtsb2x3hV5x2Z3kjxUCD/YYExDTvoGqcEbNamGZLkGPI+hJ+WXSGzw9OXqztF8= | ||
addons: | ||
firefox: 52.0.1 | ||
services: | ||
- docker | ||
- docker | ||
cache: | ||
directories: | ||
- "$HOME/.cache/pip" | ||
- $HOME/.cache/pip | ||
before_install: | ||
- sudo apt-get install xvfb | ||
- wget https://github.com/mozilla/geckodriver/releases/download/v0.15.0/geckodriver-v0.15.0-linux64.tar.gz | ||
- mkdir geckodriver | ||
- tar -xzf geckodriver-v0.15.0-linux64.tar.gz -C geckodriver | ||
- export PATH=$PATH:$(pwd)/geckodriver | ||
- pip install pip==20.0.2 | ||
- export BOTO_CONFIG=/dev/null | ||
- sudo apt-get install xvfb | ||
- wget https://github.com/mozilla/geckodriver/releases/download/v0.15.0/geckodriver-v0.15.0-linux64.tar.gz | ||
- mkdir geckodriver | ||
- tar -xzf geckodriver-v0.15.0-linux64.tar.gz -C geckodriver | ||
- export PATH=$PATH:$(pwd)/geckodriver | ||
- export BOTO_CONFIG=/dev/null | ||
install: | ||
- pip install tox-travis | ||
- pip install -r requirements/travis.txt | ||
- pip install -r requirements/pip.txt | ||
- pip install tox-travis | ||
- pip install -r requirements/ci.txt | ||
script: | ||
- xvfb-run --server-args=-ac -- tox | ||
- xvfb-run --server-args=-ac -- tox | ||
after_success: | ||
- codecov | ||
deploy: | ||
provider: pypi | ||
user: edx | ||
password: | ||
secure: DrrqJy3pyUC7hRESSchvtPFIiYCjHMsE1Cuq78nO3Z9Y+5Vlo8LRw76ui3lx5A1npOy/cp86eOoV01pPnOwv50ieo4xYbR6BuphLTvwaaBW3d2Hf3CRuq/fgg2vVR2QBJMCvNLOgI14D3von4PDxeiaI4Gu5hWWZJvBn+7w+inY= | ||
distributions: sdist bdist_wheel | ||
on: | ||
tags: true | ||
python: 3.8 | ||
condition: "$TOXENV=django22" | ||
after_deploy: | ||
- make travis_docker_push | ||
- codecov | ||
# | ||
# The following actions have been switched to github CI. | ||
# | ||
#deploy: | ||
# provider: pypi | ||
# user: edx | ||
# password: | ||
# secure: DrrqJy3pyUC7hRESSchvtPFIiYCjHMsE1Cuq78nO3Z9Y+5Vlo8LRw76ui3lx5A1npOy/cp86eOoV01pPnOwv50ieo4xYbR6BuphLTvwaaBW3d2Hf3CRuq/fgg2vVR2QBJMCvNLOgI14D3von4PDxeiaI4Gu5hWWZJvBn+7w+inY= | ||
# distributions: sdist bdist_wheel | ||
# on: | ||
# tags: true | ||
# python: 3.8 | ||
# condition: $TOXENV=django22 | ||
#after_deploy: | ||
# - make travis_docker_push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.