Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' into pyup/pin-requests-2.18.4
Browse files Browse the repository at this point in the history
  • Loading branch information
noirbizarre authored Jan 12, 2018
2 parents 239afb3 + 798243d commit de8f4f0
Show file tree
Hide file tree
Showing 690 changed files with 1,866 additions and 696 deletions.
86 changes: 41 additions & 45 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ version: 2
jobs:
python:
docker:
- image: apihackers/wagtail-circleci
- image: circleci/python:3.6
- image: postgres:9.5
environment:
- POSTGRES_USER=wapps
- POSTGRES_PASSWORD=wapps
environment:
BASH_ENV: .circleci/tools.sh
steps:
- checkout
- run:
Expand All @@ -19,90 +21,87 @@ jobs:
command: export BASE_BRANCH=$(base_branch)
- restore_cache:
keys:
- py-cache-{{ arch }}-{{ checksum "python.deps" }}
- py-cache-{{ arch }}-{{ .Branch }}
- py-cache-{{ arch }}-{{ .Environment.BASE_BRANCH }}
- python-cache-{{ arch }}-{{ checksum "python.deps" }}
- python-cache-{{ arch }}-{{ .Branch }}
- python-cache-{{ arch }}-{{ .Environment.BASE_BRANCH }}
- run:
name: Install python dependencies
command: |
virtualenv venv
python3 -m venv venv
source venv/bin/activate
pip install -r requirements/develop.pip || pip install -r requirements/develop.pip
pip install codecov
- save_cache:
key: py-cache-{{ arch }}-{{ checksum "python.deps" }}
key: python-cache-{{ arch }}-{{ checksum "python.deps" }}
paths:
- venv
- save_cache:
key: py-cache-{{ arch }}-{{ .Branch }}
key: python-cache-{{ arch }}-{{ .Branch }}
paths:
- venv
- save_cache:
key: python-cache-{{ arch }}-{{ .Environment.BASE_BRANCH }}
paths:
- venv
- run:
name: Run tests
command: |
mkdir -p reports/python
source venv/bin/activate
inv qa cover --report
inv qa cover --report --verbose
- store_test_results:
path: reports/python
path: reports
- store_artifacts:
path: reports/
destination: reports

- run:
name: Publish coverage results
command: |
source venv/bin/activate
codecov --token=82a5100d-2e8d-40c5-bf29-416153a8650d --file=reports/coverage.xml
- persist_to_workspace:
root: .
paths:
- venv

assets:
docker:
- image: apihackers/wagtail-circleci
environment:
BASH_ENV: /root/.bashrc
- image: circleci/node:8.9
steps:
- checkout
- run:
name: Compute cache keys
command: |
cat .nvmrc package.json > js.deps
export BASE_BRANCH=$(base_branch)
export NODE_VERSION=$(cat .nvmrc)
- restore_cache:
keys:
- nvm-cache-{{ arch }}-{{ .Environment.NODE_VERSION }}
name: Get the base reference branch
command: export BASE_BRANCH=$(base_branch)
- restore_cache:
keys:
- js-cache-{{ arch }}-{{ checksum "js.deps" }}
- js-cache-{{ arch }}-{{ checksum "package.json" }}
- js-cache-{{ arch }}-{{ .Branch }}
- js-cache-{{ arch }}-{{ .Environment.BASE_BRANCH }}
- run:
name: Compute JS dependencies key
command: cat .nvmrc package.json > js.deps
- run:
name: Install NodeJS and dependencies
command: nvm install && npm install
command: npm install
- run:
name: Run ESLint
command: npm run -s lint
- save_cache:
key: nvm-cache-{{ arch }}-{{ .Environment.NODE_VERSION }}
key: js-cache-{{ arch }}-{{ checksum "package.json" }}
paths:
- '{{ .Environment.NVM_DIR }}/version/node/{{ .Environment.NODE_VERSION }}'
- node_modules
- save_cache:
key: js-cache-{{ arch }}-{{ checksum "js.deps" }}
key: js-cache-{{ arch }}-{{ .Branch }}
paths:
- node_modules
- save_cache:
key: js-cache-{{ arch }}-{{ .Branch }}
key: js-cache-{{ arch }}-{{ .Environment.BASE_BRANCH }}
paths:
- node_modules
- persist_to_workspace:
root: .
paths:
- node_modules
- '{{ .Environment.NVM_DIR }}/version/node/{{ .Environment.NODE_VERSION }}'

dist:
docker:
- image: apihackers/wagtail-circleci
environment:
BASH_ENV: /root/.bashrc
- image: circleci/python:3.6
steps:
- checkout
- attach_workspace:
Expand All @@ -114,10 +113,10 @@ jobs:
# Build a wheel release
if [[ $CIRCLE_TAG ]]; then
# This is a tagged release
inv pydist
inv dist
else
# This is a simple development build
inv pydist -b $CIRCLE_BUILD_NUM
inv dist -b $CIRCLE_BUILD_NUM
fi
- store_artifacts:
path: dist
Expand All @@ -128,30 +127,27 @@ jobs:

pypi:
docker:
- image: apihackers/wagtail-circleci
- image: apihackers/twine
steps:
- attach_workspace:
at: .
- run:
name: Install Twine
command: pip install twine
- deploy:
name: Publish on PyPI
command: twine upload --username "${PYPI_USERNAME}" --password "${PYPI_PASSWORD}" dist/*.whl

github:
docker:
- image: apihackers/wagtail-circleci
- image: apihackers/ghr
steps:
- attach_workspace:
at: .
- run:
name: Upload github release
command: gh_release
command: ghr ${CIRCLE_TAG} dist/

npmjs:
docker:
- image: apihackers/wagtail-circleci
- image: circleci/node:8.6
steps:
- checkout
- attach_workspace:
Expand All @@ -161,7 +157,7 @@ jobs:
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run:
name: Install NodeJS and dependencies
command: nvm use && npm publish
command: npm publish

workflows:
version: 2
Expand Down
20 changes: 20 additions & 0 deletions .circleci/tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

# Create a self signed certificate
base_branch() {
# Get the base branch against which a PR has been made
# Extracted from https://discuss.circleci.com/t/how-to-get-the-pull-request-upstream-branch/5496/3
# Until https://discuss.circleci.com/t/expose-the-title-and-upstream-branch-of-a-pull-request-build-as-an-env/5475/1
# is implemented

# Set a default in case we run into rate limit restrictions
BASE_BRANCH="master"
if [[ $CIRCLE_PR_NUMBER ]]; then
BASE_BRANCH=$(curl -fsSL https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls/$CIRCLE_PR_NUMBER | jq -r '.base.ref')
elif [[ $CIRCLE_TAG ]]; then
BASE_BRANCH='master'
elif [[ $CIRCLE_BRANCH ]]; then
BASE_BRANCH=$CIRCLE_BRANCH
fi
echo $BASE_BRANCH
}
1 change: 0 additions & 1 deletion .drone.sec

This file was deleted.

48 changes: 0 additions & 48 deletions .drone.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ charset = utf-8
[*.py]
indent_style = space
indent_size = 4
max_line_length = 99
max_line_length = 120

[assets/js/**.{js,vue}]
indent_style = space
Expand Down
26 changes: 26 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
env:
browser: true
es6: true
extends:
- eslint:recommended
- plugin:vue/recommended
parserOptions:
sourceType: module
globals:
require: false
DEBUG: false
rules:
indent:
- error
- 4
- SwitchCase: 1
VariableDeclarator: 0
linebreak-style:
- error
- unix
quotes:
- error
- single
semi:
- error
- always
26 changes: 0 additions & 26 deletions .gitlab-ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v8.6.0
v8.9.1
2 changes: 1 addition & 1 deletion .pyup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# configure dependency pinning globally
# default: True
# allowed: True, False
# pin: True
pin: False

# set the default branch
# default: empty, the default branch on GitHub
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
include README.md CHANGELOG.md MANIFEST.in LICENSE
recursive-include wapps *
recursive-include wappsdemo *
recursive-include requirements *.pip

global-exclude *.pyc
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# WApps

[![Build Status](https://ci.noirbizarre.info/api/badges/apihackers/wapps/status.svg)](https://ci.noirbizarre.info/apihackers/wapps)
[![CircleCI](https://img.shields.io/circleci/project/github/apihackers/wapps.svg)](https://circleci.com/gh/apihackers/workflows/wapps)
[![codecov](https://codecov.io/gh/apihackers/wapps/branch/master/graph/badge.svg)](https://codecov.io/gh/apihackers/wapps/branch/master)
[![Last version](https://img.shields.io/pypi/v/wapps.svg)](https://pypi.python.org/pypi/wapps)
[![License](https://img.shields.io/pypi/l/wapps.svg)](https://pypi.python.org/pypi/wapps)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/wapps.svg)](https://pypi.python.org/pypi/wapps)

A very optionated set of Wagtail reusable applications and helpers
meant to speedup website development. There is not any universality intent.
Expand All @@ -20,7 +24,7 @@ It assumes the following stacks:
### Frontend Stack

- Vue 2 for front components
- Webpack 2 as front build toolchain
- Webpack 3 as front build toolchain
- SCSS as style language
- Bootstrap and Font-awesome as base frameworks

Expand Down
7 changes: 4 additions & 3 deletions bumpr.rc
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ part = patch
suffix = dev

[changelog]
file = CHANGELOG.rst
bump = {version} ({date:%Y-%m-%d})
prepare = Current
file = CHANGELOG.md
bump = ## {version} ({date:%Y-%m-%d})
prepare = ## Current (in progress)
separator =

[readthedoc]
id = wapps
Loading

0 comments on commit de8f4f0

Please sign in to comment.