Skip to content

Commit

Permalink
bump version, merge pull request #48 from casperdcl/devel
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Nov 15, 2020
2 parents 948f2cb + f8a014c commit 639102f
Show file tree
Hide file tree
Showing 9 changed files with 147 additions and 172 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
branch = True
omit =
gitfame/tests/*
relative_files = True
[report]
show_missing = True
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@

.git* export-ignore
MANIFEST.in export-ignore
.travis.yml export-ignore
codecov.yml export-ignore
.git-fame.1.md export-ignore
132 changes: 129 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Test
on:
push:
pull_request:
schedule:
- cron: '3 2 1 * *' # M H d m w (monthly at 2:03)
- cron: '3 2 1 * *' # M H d m w (monthly at 2:03)
jobs:
check:
name: Check
Expand All @@ -23,7 +24,7 @@ jobs:
test:
strategy:
matrix:
python: [3.4, 3.5, 3.6, 3.8]
python: [2.7, 3.5, 3.6, 3.7, 3.8]
name: Python ${{ matrix.python }}
runs-on: ubuntu-latest
steps:
Expand All @@ -34,8 +35,133 @@ jobs:
- name: Install
run: |
pip install -U tox setuptools_scm
pip install -U .
- name: Test
run: tox -e py${PYVER/./}
env:
PYVER: ${{ matrix.python }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Coveralls Parallel
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
finish:
name: Coverage
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: exoplanet-dev/coveralls-python-action@develop # https://github.com/AndreMiras/coveralls-python-action/pull/5
with:
parallel-finished: true
deploy:
name: Deploy
needs: [check, test, finish]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install
run: |
sudo apt-get install -yqq pandoc
pip install setuptools_scm
git fetch --unshallow --tags
pip install .[dev]
make build .dockerignore snapcraft.yaml
- if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: casperdcl/deploy-pypi@v1
with:
password: ${{ secrets.TWINE_PASSWORD }}
gpg_key: ${{ secrets.GPG_KEY }}
skip_existing: true
- id: collect_assets
name: Collect assets
shell: bash
run: |
echo "::set-output name=asset_path::$(ls dist/*.whl)"
echo "::set-output name=asset_name::$(basename dist/*.whl)"
echo "::set-output name=asset_path_sig::$(ls dist/*.whl.asc 2>/dev/null)"
echo "::set-output name=asset_name_sig::$(basename dist/*.whl.asc 2>/dev/null)"
if [[ $GITHUB_REF == refs/tags/v* ]]; then
echo ::set-output name=docker_tags::latest,${GITHUB_REF/refs\/tags\/v/}
echo ::set-output name=snap_channel::stable
elif [[ $GITHUB_REF == refs/heads/master ]]; then
echo ::set-output name=docker_tags::master
echo ::set-output name=snap_channel::candidate
elif [[ $GITHUB_REF == refs/heads/devel ]]; then
echo ::set-output name=docker_tags::devel
echo ::set-output name=snap_channel::edge
fi
git log --pretty='format:%d%n- %s%n%b---' $(git tag --sort=v:refname | tail -n2 | head -n1)..HEAD > _CHANGES.md
- if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: git-fame ${{ github.ref }} stable
body_path: _CHANGES.md
draft: true
- if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.collect_assets.outputs.asset_path }}
asset_name: ${{ steps.collect_assets.outputs.asset_name }}
asset_content_type: application/zip
- if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.collect_assets.outputs.asset_path_sig }}
asset_name: ${{ steps.collect_assets.outputs.asset_name_sig }}
asset_content_type: text/plain
- name: Snap install
uses: samuelmeuli/action-snapcraft@v1
with:
use_lxd: true
- name: Snap build
shell: bash
run: |
export SNAPCRAFT_IMAGE_INFO='{"build_url": "https://github.com/casperdcl/git-fame/actions/runs/'$GITHUB_RUN_ID'"}'
sg lxd -c 'snapcraft --use-lxd'
env:
SNAPCRAFT_BUILD_INFO: 1 # https://snapcraft.io/blog/introducing-developer-notifications-for-snap-security-updates
- if: github.event_name == 'push' && steps.collect_assets.outputs.snap_channel
name: Snap login
uses: samuelmeuli/action-snapcraft@v1
with:
skip_install: true
snapcraft_token: ${{ secrets.SNAP_TOKEN }}
- if: github.event_name == 'push' && steps.collect_assets.outputs.snap_channel
name: Snap deploy
shell: bash
run: |
if [ -n "$(ls git-fame*.snap 2>/dev/null)" ]; then
sudo snapcraft upload git-fame*.snap --release $CHANNEL
fi
env:
CHANNEL: ${{ steps.collect_assets.outputs.snap_channel }}
- name: Docker build push
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: ${{ github.actor }}/git-fame
tags: ${{ steps.collect_assets.outputs.docker_tags }}
password: ${{ secrets.DOCKER_PWD }}
username: ${{ secrets.DOCKER_USR }}
no_push: ${{ steps.collect_assets.outputs.docker_tags == '' }}
- name: Docker push GitHub
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: ${{ github.actor }}/git-fame/git-fame
tags: ${{ steps.collect_assets.outputs.docker_tags }}
password: ${{ github.token }}
username: ${{ github.actor }}
registry: docker.pkg.github.com
no_push: ${{ steps.collect_assets.outputs.docker_tags == '' }}
Binary file removed .meta/.casperdcl.gpg.enc
Binary file not shown.
2 changes: 1 addition & 1 deletion .meta/.snapcraft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license: MPL-2.0
parts:
git-fame:
plugin: python
python-packages: [tqdm, pyyaml]
python-packages: [tqdm, pyyaml, setuptools_scm]
stage-packages: [git]
source: {source}
source-commit: '{commit}'
Expand Down
163 changes: 0 additions & 163 deletions .travis.yml

This file was deleted.

16 changes: 14 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,18 @@ Generating
--unit file --desc "Generating CODEOWNERS" \
> .github/CODEOWNERS
Zenodo config
~~~~~~~~~~~~~

Generating `.zenodo.json <https://developers.zenodo.org/#deposit-metadata>`__:

.. code:: sh
git fame -wMC --format json \
| jq -c '{creators: [.data[] | {name: .[0]}]}' \
| sed -r -e 's/(\{"name")/\n \1/g' -e 's/:/: /g' \
> .zenodo.json
Contributions
-------------

Expand Down Expand Up @@ -266,8 +278,8 @@ We are grateful for all |GitHub-Contributions|.

|README-Hits|

.. |Build-Status| image:: https://img.shields.io/travis/casperdcl/git-fame/master.svg?logo=travis
:target: https://travis-ci.org/casperdcl/git-fame
.. |Build-Status| image:: https://img.shields.io/github/workflow/status/casperdcl/git-fame/Test/master?logo=GitHub
:target: https://github.com/casperdcl/git-fame/actions?query=workflow%3ATest
.. |Coverage-Status| image:: https://coveralls.io/repos/casperdcl/git-fame/badge.svg?branch=master
:target: https://coveralls.io/github/casperdcl/git-fame
.. |Branch-Coverage-Status| image:: https://codecov.io/gh/casperdcl/git-fame/branch/master/graph/badge.svg
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def cythonize(*args, **kwargs):
extras_require['full'] = list(set(sum(
extras_require.values(), [])))
extras_require['dev'] = list(set(
extras_require['full'] + ['py-make>=0.1.0', 'twine']))
extras_require['full'] + ['py-make>=0.1.0', 'twine', 'wheel']))

README_rst = ''
fndoc = os.path.join(src_dir, 'README.rst')
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ commands =
codecov

[testenv]
passenv = CI TRAVIS TRAVIS_* TOXENV CODECOV_*
passenv = CI TOXENV CODECOV_* COVERALLS_*
deps =
{[extra]deps}
tqdm
Expand Down

0 comments on commit 639102f

Please sign in to comment.