Skip to content

Commit

Permalink
Merge v1.0.1 progress into master
Browse files Browse the repository at this point in the history
  • Loading branch information
scarletcafe committed Nov 25, 2018
1 parent 396606f commit 350b517
Show file tree
Hide file tree
Showing 49 changed files with 4,453 additions and 935 deletions.
103 changes: 49 additions & 54 deletions .circleci/config.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,54 +1,49 @@
# 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

# 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

working_directory: ~/repo

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "install_requires.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 -U pytest
pip install -r install_requires.txt
pip install -U .
- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "install_requires.txt" }}

# run tests!
- run:
name: run tests
command: |
. venv/bin/activate
pytest -vs
- store_artifacts:
path: test-reports
destination: test-reports

# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
build:
docker:
- image: circleci/python:3.6-stretch

working_directory: ~/repo

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "requirements.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 -U coverage flake8 isort pylint pytest pytest-cov
pip install -U -r install_requires.txt
- save_cache:
paths:
- ./venv
key: v1-dependencies-{{ checksum "requirements.txt" }}

# run tests
- run:
name: run tests
command: |
. venv/bin/activate
PYTHONPATH=$PYTHONPATH:$(pwd) pytest -vs --cov=jishaku --cov-report term-missing:skip-covered
pip install -U .
rm -rf jishaku
pytest -vs
- store_artifacts:
path: test-reports
destination: test-reports

23 changes: 23 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[flake8]
ignore = F403,
F405
max-line-length = 120
exclude = .git,
.cache,
.circleci,
.github,
.idea,
.vscode,
__pycache__,
.env,
.venv,
env,
venv,
env.bak,
venv.bak,
.DS_Store,
.python-version,
.tox,
build,
dist,
.pyc
4 changes: 4 additions & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,7 @@ venv.bak/

# IntelliJ
.idea/*

# Visual Studio Code
.code/*
.vscode/*
99 changes: 99 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@

stages:
- build

alpine 3.7:
stage: build
image: gorialis/discord.py:3.7-alpine-rewrite
before_script:
- pip install -U coverage flake8 isort pylint pytest pytest-cov sphinx sphinxcontrib-asyncio
- pip install -r install_requires.txt
script:
- PYTHONPATH="$(pwd)" pytest -vs --cov=jishaku --cov-report term-missing:skip-covered
- flake8 .
- pylint -j "$(nproc)" jishaku
- isort . --check-only --recursive
- python ./setup.py bdist_wheel
- pip install dist/$(ls dist)
- rm -rf jishaku
- pytest -vs
- cd docs && make html
artifacts:
paths:
- dist
- docs/_build
expire_in: 2 days
retry: 1
when: always

stretch 3.7:
stage: build
image: gorialis/discord.py:3.7-stretch-rewrite
before_script:
- pip install -U coverage flake8 isort pylint pytest pytest-cov sphinx sphinxcontrib-asyncio
- pip install -r install_requires.txt
script:
- PYTHONPATH="$(pwd)" pytest -vs --cov=jishaku --cov-report term-missing:skip-covered
- flake8 .
- pylint -j "$(nproc)" jishaku
- isort . --check-only --recursive
- python ./setup.py bdist_wheel
- pip install dist/$(ls dist)
- rm -rf jishaku
- pytest -vs
- cd docs && make html
artifacts:
paths:
- dist
- docs/_build
expire_in: 2 days
retry: 1
when: always

alpine 3.6:
stage: build
image: gorialis/discord.py:3.6-alpine-rewrite
before_script:
- pip install -U coverage flake8 isort pylint pytest pytest-cov sphinx sphinxcontrib-asyncio
- pip install -r install_requires.txt
script:
- PYTHONPATH="$(pwd)" pytest -vs --cov=jishaku --cov-report term-missing:skip-covered
- flake8 .
- pylint -j "$(nproc)" jishaku
- isort . --check-only --recursive
- python ./setup.py bdist_wheel
- pip install dist/$(ls dist)
- rm -rf jishaku
- pytest -vs
- cd docs && make html
artifacts:
paths:
- dist
- docs/_build
expire_in: 2 days
retry: 1
when: always

stretch 3.6:
stage: build
image: gorialis/discord.py:3.6-stretch-rewrite
before_script:
- pip install -U coverage flake8 isort pylint pytest pytest-cov sphinx sphinxcontrib-asyncio
- pip install -r install_requires.txt
script:
- PYTHONPATH="$(pwd)" pytest -vs --cov=jishaku --cov-report term-missing:skip-covered
- flake8 .
- pylint -j "$(nproc)" jishaku
- isort . --check-only --recursive
- python ./setup.py bdist_wheel
- pip install dist/$(ls dist)
- rm -rf jishaku
- pytest -vs
- cd docs && make html
artifacts:
paths:
- dist
- docs/_build
expire_in: 2 days
retry: 1
when: always
4 changes: 4 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[settings]
line_length=120
known_third_party=discord,humanize
known_first_party=jishaku
Loading

0 comments on commit 350b517

Please sign in to comment.