Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#280 Add main.yml #287

Merged
merged 9 commits into from
Jul 2, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
martinmacko47 marked this conversation as resolved.
Show resolved Hide resolved

name: Python package
viliambalaz marked this conversation as resolved.
Show resolved Hide resolved
martinmacko47 marked this conversation as resolved.
Show resolved Hide resolved

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
martinmacko47 marked this conversation as resolved.
Show resolved Hide resolved

jobs:
build:

runs-on: ubuntu-18.04
strategy:
matrix:
python-version: [2.7.17, 2.7.18]

steps:
- uses: actions/checkout@v2
martinmacko47 marked this conversation as resolved.
Show resolved Hide resolved
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
martinmacko47 marked this conversation as resolved.
Show resolved Hide resolved
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install virtualenv && sudo apt-get install gettext
martinmacko47 marked this conversation as resolved.
Show resolved Hide resolved
python -m pip install --upgrade pip
martinmacko47 marked this conversation as resolved.
Show resolved Hide resolved
martinmacko47 marked this conversation as resolved.
Show resolved Hide resolved
printf "%s\n" \
"1" \
"y" \
"y" \
"y" \
martinmacko47 marked this conversation as resolved.
Show resolved Hide resolved
"y" \
"localhost:8000" \
"" \
"" \
"" \
"" \
"[email protected]"\
"" \
"" \
"y" \
"y" \
"y" \
"y" \
"admin" \
"" \
"" \
"" \
"" \
| PYTHONUNBUFFERED=1 python setup.py
martinmacko47 marked this conversation as resolved.
Show resolved Hide resolved
- name: Test
run: |
env/bin/python manage.py test
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import string
import random
import json
import getpass
import textwrap
import unicodedata

Expand Down Expand Up @@ -103,7 +102,7 @@ def input_password(self, key, prompt, hasher=None, required=False):
configured = self.data.get(key, u'')
prompt = u'\n{} [{}]: '.format(prompt, u'*****' if configured else u'')
while True:
inputed = getpass.getpass(PROMPT + prompt + RESET)
inputed = raw_input(PROMPT + prompt + RESET)
martinmacko47 marked this conversation as resolved.
Show resolved Hide resolved
if required and not inputed and not configured:
print(ERROR + u'\nError: The value is required.' + RESET)
continue
Expand Down Expand Up @@ -281,7 +280,10 @@ def install_requirements(configure):
],
}[server_mode]
requirements += {
u'Y': [u'-r', u'requirements/tests.txt'],
u'Y': [
u'-r', u'requirements/tests.txt',
u'-r', u'poleno/dummymail/requirements.txt'
martinmacko47 marked this conversation as resolved.
Show resolved Hide resolved
],
u'N': [],
}[enable_unittests]
call(u'Installing requirements for the selected server mode:',
Expand Down