Commit Graph

32 Commits

Author SHA1 Message Date
Richard Si
74e51e6a82
Automatically build and upload binaries on release (#1743)
This commit adds a new GitHub Actions workflow that builds self-contained
binaries / executables and uploads them as release assets to the triggering
release. Publishing a release, drafting one doesn't count, will trigger this
workflow.

I personally used GitHub Actions only because it's the CI/CD platform(?)
I am familiar with. Only Windows and Linux binaries are supported since
I don't have any systems running Mac OS.

For Linux, I had originally planned to use the manylinux2010 docker image
the PyPA provides for highly compatible wheel building, but unfortunately
it wasn't feasible due to GitHub Actions and PyInstaller incompatibilities.
As a stopgap the oldest versions of Linux and Windows are used although
Windows Server 2019 isn't that old nor is Ubuntu 16.04! I guess someone
(maybe me) could work out something else if compatibility is big problem.

A few things you should know about the workflow:
 - You don't need to set the `GITHUB_TOKEN` secret as it is automatically
   provided by GitHub.
 - matrix.pathsep is used because PyInstaller configuration's format is OS
   dependent for some reason ...

Also it's worth mentioning that Black once had Travis CI and AppVeyor
configuration that did the same thing as this commit. They were committed
in mid 2018 and worked (somewhat) well. Eventually we stopped using AppVeyor
and the refactor to packages broke the Travis CI config. This commit
replaces the still existing and broken Travis CI config wholesale.

Co-authored-by: Anders Fredrik Kiær <31612826+anders-kiaer@users.noreply.github.com>

 - Anders told me that I could get the release asset upload URL directly
   from the github.event.release payload. I originally planned to use
   bruceadams/get-release to get such URL.
2020-11-01 13:17:23 -08:00
Abdullah Selek
8c8af4f161
Start using Python 3.9 on Travis (#1790)
* Start using Python 3.9 on Travis

* Remove allow_failures
2020-10-30 08:24:18 -07:00
Sagi Shadur
e6cd10e761
Extract formatting tests (#1785)
* Update test versions

* Use parametrize to remove tests duplications

* Extract sources format tests

* Fix mypy errors

* Fix .travis.yml
2020-10-30 08:12:04 -07:00
Hugo van Kemenade
2955bdc676
pre-commit: show diff on failure on CI (#1552)
* pre-commit: --show-diff-on-failure

* pre-commit: --show-diff-on-failure
2020-07-15 14:53:48 -07:00
Cooper Lees
2082a325fd
Refactor black into packages in src/ dir (#1376)
- Move black.py to src/black/__init__.py
- Have setuptools_scm make src/_black_version.py and exclude from git
- Move blackd.py to src/blackd/__init__.py
- Move blib2to3/ to src/
- Update `setup.py`
- Update unittests to pass
  - Mostly path fixing + resolving
- Update CI
  - pre-commit config
  - appveyor + travis

Tested on my mac with python 3.7.5 via:
```
python3 -m venv /tmp/tb3
/tmp/tb3/bin/pip install --upgrade setuptools pip coverage pre-commit
/tmp/tb2/bin/pip install ~/repos/black/
cd ~/repos/black/
/tmp/tb2/bin/coverage run tests/test_black.py
/tmp/tb3/bin/pre-commit run -a
/tmp/tb3/bin/black --help
/tmp/tb3/bin/black ~/repos/ptr/ptr.py
```
2020-05-08 08:50:50 -07:00
Hugo van Kemenade
362b722004
Test on Python 3.9-dev (#1393)
* Test on Python 3.9-dev

* Python 3.9 still in alpha, allow to fail
2020-05-08 08:19:06 -07:00
Jon Dufresne
1382eabb3f
Remove deprecated use of 'setup.py test' (#1275)
Since setuptools v41.5.0 (27 Oct 2019), the 'test' command is formally
deprecated and should not be used. Now use unittest as the test entry
point.
2020-05-08 06:23:50 -07:00
Yngve Høiseth
a6d866990e Automatic markdown and YAML formatting with Prettier (#874) 2019-10-21 11:42:46 +02:00
Hugo van Kemenade
000147c007 Run pre-commit on Travis CI (#1081) 2019-10-21 11:18:23 +02:00
Hugo van Kemenade
3bfb66971f Test on Python 3.8 final (#1070) 2019-10-15 11:56:28 -07:00
Zsolt Dollenstein
6b5eb7d465 skip tests touching aiohttp when known exception occurs 2019-07-28 16:35:10 +01:00
Hugo van Kemenade
ffa676cd7d python/black -> psf/black (#936) 2019-07-23 09:50:50 +01:00
Hugo
4a953b7241 ambv/black -> python/black (#819) 2019-05-02 20:19:52 +01:00
Jelle Zijlstra
a00f426637 add missing aiohttp dep (#699)
add missing aiohttp dep

Also mark 3.8 as allowed to fail for now; it will fail due to an aiohttp bug.

Fixes #690
2019-02-14 20:23:56 +00:00
Hugo
a9d8af466a 'sudo: required' no longer required https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration (#694) 2019-02-06 08:07:31 -08:00
Jelle Zijlstra
8d58827376
Refactor Travis (#614)
Fixes #305 

- Run separate jobs for mypy, self-formatting, flake8, and test runs.
- Don't run flake8 in 3.8 because it is broken (and we can't really expect flake8 to always keep up with 3.8 development).
- Fix unused variable in test
2018-11-20 08:42:43 -08:00
Zsolt Dollenstein
52da1f08da
use blackrelease github user for uploading release artifacts 2018-10-27 17:53:04 +01:00
Cong
649c3c7a05 Deploy linux binary (#362) (#410) 2018-09-26 20:07:35 +01:00
Zsolt Dollenstein
a82f186787 blackd: a HTTP server for blackening (#460) 2018-09-17 10:02:25 -07:00
cclauss
3bdd423891 TravisCI: Test on production Python 3.7 and 3.8-dev (#393) 2018-07-02 18:05:40 +02:00
Łukasz Langa
fac4cf995c Use black . now that we can 2018-06-06 17:04:32 -07:00
Łukasz Langa
dbe26161fa Reformat docs/conf.py, too. 2018-06-04 12:29:14 -07:00
Łukasz Langa
4cb338e3dd Revert "don't run tests from /build"
This reverts commit 1687892d63.

This is no longer necessary with the fix in the previous commit.
2018-06-04 11:03:45 -07:00
Zsolt Dollenstein
1687892d63 don't run tests from /build 2018-06-01 23:12:20 +01:00
Łukasz Langa
223268aaae Update Travis to use the default 3.7-dev binary 2018-05-09 15:56:44 -07:00
Łukasz Langa
df80103c33 Solve the Travis failure with 3.7 from deadsnakes 2018-04-18 20:27:34 -07:00
Łukasz Langa
42519f8b32 Coverage reporting 2018-03-26 00:49:21 -07:00
Łukasz Langa
0de0851a47 Add flake8 to CI, too 2018-03-16 00:47:01 -07:00
Łukasz Langa
9fea478022 Also run mypy on test_black.py 2018-03-15 23:55:22 -07:00
Łukasz Langa
c87b33c4d5 Add mypy to CI 2018-03-15 23:17:02 -07:00
Łukasz Langa
f86b30a610 Bummer, Python 3.8 builds don't work yet 2018-03-14 14:26:14 -07:00
Łukasz Langa
e74117f172 Initial commit 2018-03-14 12:55:32 -07:00