Skip to content

Commit

Permalink
Initial (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cariad Eccleston authored Dec 7, 2020
1 parent 1a7742a commit efa54df
Show file tree
Hide file tree
Showing 64 changed files with 2,370 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[run]
command_line = -m pytest
omit =
*/test_*.py
source = wev

[report]
fail_under = 89
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.sh]
indent_size = 2

[*.yml]
indent_size = 2
84 changes: 84 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: wev

on: # yamllint disable-line rule:truthy
- push

jobs:

build:
container: cariad/ci:1.0.0
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2

- name: Sync dependencies
run: pipenv sync --dev

- name: Test
run: pipenv run ./test.sh

- name: Version
run: echo "${GITHUB_REF##*/}" > wev/VERSION

- name: Build
run: pipenv run ./build.sh

- name: Archive distributable
uses: actions/upload-artifact@v2
with:
name: distributable
path: dist
retention-days: 1

cli_test:
name: CLI test (Python ${{ matrix.python-version }})
needs: build
runs-on: ubuntu-20.04
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Download build distributable
uses: actions/download-artifact@v2
with:
name: distributable

- name: Install distributable
run: pip install "$(ls *.whl)"

- name: Assert version
run: |
wev --version | tee version.tmp
grep -qF "${GITHUB_REF##*/}" version.tmp
publish:
if: startsWith(github.ref, 'refs/tags')
needs: build
runs-on: ubuntu-20.04
steps:
- name: Download build distributable
uses: actions/download-artifact@v2
with:
name: distributable

- name: Create distributable directory
run: |
mkdir dist
cp *.whl dist
ls -al dist/
- name: Publish
uses: pypa/gh-action-pypi-publish@v1.4.1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*.egg-info
__*__
.DS_Store
.coverage
.mypy_cache
.pytest_cache
.vscode
build
dist
htmlcov
typing-coverage.xml
8 changes: 8 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: default

rules:
document-start: disable
line-length:
allow-non-breakable-inline-mappings: true
allow-non-breakable-words: true
max: 80
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include wev/VERSION
23 changes: 23 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
black = "==20.8b1"
coverage = "~=5.3"
flake8 = "~=3.8"
isort = "~=5.5"
mock = "~=4.0"
mypy = "~=0.790"
pytest = "~=6.1"
yamllint = "~=1.25"

[packages]
colorama = "~=0.4"
dwalk = "~=1.1"
pytz = "*"
"ruamel.yaml" = "~=0.16"

[requires]
python_version = "3.9"
Loading

0 comments on commit efa54df

Please sign in to comment.