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

Add github actions #379

Merged
merged 2 commits into from Mar 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,52 @@
name: CI

on:
push:
branches: [master, test]
pull_request:
branches: [master, test]

jobs:
test:
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows, macos]
python-version: ['3.5', '3.6', '3.7', '3.8', '3.9', 'pypy3']
include:
# https://github.com/pydoit/doit/issues/372
- os: macos
pytest-args: -k 'not(cmd_auto or TestFileWatcher)'
- os: macos
python-version: pypy3
pytest-args: -k 'not(cmd_auto or TestFileWatcher or remove_all or ForgetAll)'
exclude:
- os: windows
python-version: pypy3
steps:
- if: ${{ matrix.os == 'ubuntu' }}
run: sudo apt-get install strace
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- run: pip install --user -U pip wheel setuptools
- id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py', 'dev_requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- run: pip install . -r dev_requirements.txt python-coveralls
- run: pip freeze
- run: pip check
- run: doit pyflakes
- run: py.test -vv ${{ matrix.pytest-args }}
- if: ${{ matrix.os == 'ubuntu' && matrix.python-version == '3.8' }}
run: |
doit coverage
coveralls || echo "TODO: remove when run on a repo that is set up"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What this means? "which kind of repo setup"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hadn't set up codecov in a while, since the bad old days when a token was needed. I assume it's just working now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok understood. No, it is not working:

INFO:coveralls:422
INFO:coveralls:{"message":"Couldn't find a repository matching this job.","error":true}
TODO: remove when run on a repo that is set up

I dont understand this error message. It seems to work well on travis... Any idea why ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, there's probably a token or something. And looking at it, of course, it's coveralls. It looks it does need a token in secrets, which I don't like to bother with until i absolutely must.

I have been using codecov recently, which doesn't require a secret for public repos, and only generates one PR comment, which it updates, which I find more convenient... will do a follow-up PR with a demo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR up #384 with lots of ✔️

25 changes: 25 additions & 0 deletions .github/workflows/website.yml
@@ -0,0 +1,25 @@
name: Website

on:
push:
branches: [master, test]
pull_request:
branches: [master, test]

jobs:
build:
runs-on: ubuntu-latest
steps:
- run: sudo apt-get install hunspell hunspell-en-us
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- run: pip install -U pip wheel setuptools
- run: pip install . -r doc_requirements.txt -r dev_requirements.txt
- run: pip freeze
- run: doit -v2 website
- uses: actions/upload-artifact@v2
with:
name: Website
path: ./doc/_build
2 changes: 1 addition & 1 deletion dev_requirements.txt
Expand Up @@ -3,5 +3,5 @@

pyflakes
pytest>=5.4.1
coverage>=4.0
coverage>=4.0,<5
doit-py>=0.4.0
8 changes: 4 additions & 4 deletions doc/stories.rst
Expand Up @@ -89,15 +89,15 @@ our papers, mentioning it in our funding requests, etc).
Thanks for developing `doit`, it's just wonderful for computational biology (and
for many other tasks, of course, but this is our research field:)!

`Cheminformatics data processing @ Atomwise <https://www.atomwise.com>`_
`Cheminformatics data processing @ Atomwise <https://www.atomwise.com>`_
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

by `Jon Sorenson <https://github.com/drkeoni>`_ (2018-12-14)

I came to `doit` from the loose requirement that I wanted a task-dependency/DAG type
of workflow solution for the various pipelines that our team is constructing.
I come from computational biology originally, and the similarity of data processing pipelines
to build systems has long been appreciated. More than a decade ago
to build systems has long been appreciated. More than a decade ago
many of us were writing bioinformatics
pipelines in `make` because it gave us so many features "for free."

Expand All @@ -112,7 +112,7 @@ from an intermediate stage.

I knew that build-system based frameworks would do exactly what I wanted and not
hand me too much cruft, and on that note I found `doit`. It's worked perfectly
for my needs:
for my needs:

- The order of tasks is derived from dependencies

Expand Down Expand Up @@ -184,7 +184,7 @@ Each sound should be loaded from PCM, converted into MP3 or OGG and linked with


`MetalK8s @ Scality <https://www.scality.com/>`_
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

by `Sylvain Laperche <https://github.com/slaperche-scality>`_ (2019-05-06)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_action.py
Expand Up @@ -25,7 +25,7 @@

@pytest.fixture
def tmpfile(request):
temp = tempfile.TemporaryFile('w+')
temp = tempfile.TemporaryFile('w+', encoding="utf-8")
request.addfinalizer(temp.close)
return temp

Expand Down
1 change: 1 addition & 0 deletions tests/test_dependency.py
Expand Up @@ -17,6 +17,7 @@
PROGRAM = "%s %s/sample_process.py" % (executable, TEST_PATH)



def test_unicode_md5():
data = "我"
# no exception is raised
Expand Down