Commit Graph

64 Commits

Author SHA1 Message Date
Bruno Alla
68f7268770
Run Black on Travis (#1957)
* Create a test matrix on Travis CI to help testing multiple options

* Change test_docker.sh to fail if any command in it fails

* Run black on the CI with --check option

* Fix formatting of project files using black

* Install black in the docker container

* Exclude migrations in black checks

* Fix Black formatting violations

* Run black on the whole generated project & fix issues
2019-03-18 17:49:43 +00:00
btknu
6e72169ffe Add missing script key to Travis CI config (#1950)
* Add failing test for travis.yml

I see three options to test travis.yml :

1. Testing that the YAML contains relevant value. Least useful and least
reliable, but simplest to implement.

2. Testing that the YAML is valid TravisCI YAML. Unfortunately this is
difficult / impossible. Doing 'travis lint' would succeed, this command
does not check for 'script' key presence and wouldn't be useful for us.

We could use 'travis-build' to verify that the YAML can be converted to
a worker config, but as of now 'travis-build' doesn't work out of the
box.

There is a new tool for validating travis YAML files 'travis-yml', but
as of now it's a ruby-only library and it's still a work in progress.

3. Running Travis CI task based on the generated YAML. This seems the
best approach, however since cookiecutter-django itself uses Travis CI,
that would require running Travis CI from within Travis CI.

Scheduling Travis CI job without a github push still requires a public
github repo, which is something that we can't generate on demand.

Given that I'm opting to use approach 1.

* Adds missing config to generated .travis.yml

The keys added are as follows:

1. 'script'

Required by Travis, cookiecutter-django used to provide it until it has
been removed together with hitch.

I'm assuming hitch has been replaced with pytest, I'm setting pytest as
the new value for the 'script' key.

2. 'install'

Not required by Travis, but necessary in our case; installs test
libraries, mostly pytest.

As of now this points to 'local.txt' requirements file. There used to be
a separate 'test.txt' requirements file but it has been decided to merge
it with 'local.txt', see discussion in
https://github.com/pydanny/cookiecutter-django/pull/1557 .

* Update CONTRIBUTORS.rst
2019-03-05 22:10:45 -03:00
Daniel Roy Greenfeld
3f753e0411
First pass at running black across the project (#1602) 2018-04-08 17:03:29 -05:00
Daniel Roy Greenfeld
6aced9ba73 Remove Python 2.7 support per #1129 (#1130)
* Remove Python 2.7 support per

* Remove Python 2.7 references

* Remove Python 2.7 references

* remove python 2 entirely
2017-04-21 12:31:45 -07:00
Steve Steiner
d556f3cc5f Make test_docker.sh tests pass by passing new password auth rules 2016-09-29 01:01:01 -03:00
Daniel Roy Greenfeld
b2d0a86344 simplify cookiecutter.json 2016-06-04 17:16:48 -07:00
Audrey Roy Greenfeld
fb59c5117b More repo_name -> project_slug cleanup 2016-04-20 11:41:17 -07:00
Audrey Roy Greenfeld
7cb5c0bba4 Update test fixture to use project_slug, not repo_name 2016-04-20 11:28:34 -07:00
Bo Lopker
a300f1190d Quote consistency 2016-04-15 23:29:04 -07:00
Tom Atkins
3316a3b023 Fix merge conflict in README.rst 2015-11-18 11:16:25 +00:00
Raphael Pierzina
664c72d291 Implement test for flake8 compliance 2015-11-09 00:33:41 +01:00
Raphael Pierzina
f579cf08ac Implement parametrized test for enabled features 2015-11-09 00:33:41 +01:00
Raphael Pierzina
646e376a8e Integrate additional checks of base.py with slight improvements 2015-11-09 00:33:41 +01:00
Raphael Pierzina
6c339a1417 Implement a basic test with cookies.bake() 2015-11-09 00:33:41 +01:00