Skip to content

Commit

Permalink
Merge 28f7c19 into 50d228d
Browse files Browse the repository at this point in the history
  • Loading branch information
escaped committed Oct 8, 2020
2 parents 50d228d + 28f7c19 commit 509eeec
Show file tree
Hide file tree
Showing 35 changed files with 1,859 additions and 593 deletions.
20 changes: 0 additions & 20 deletions .coveragerc

This file was deleted.

19 changes: 19 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"template": "https://github.com/escaped/cookiecutter-pypackage.git",
"commit": "b58e99ccf10eede92dee5810738871726199ecbb",
"context": {
"cookiecutter": {
"author": "Alexander Frenzel",
"author_email": "alex@relatedworks.com",
"github_username": "escaped",
"project_name": "django-video-encoding",
"project_slug": "video_encoding",
"short_description": "django-video-encoding helps to convert your videos into different formats and resolutions.",
"version": "0.4.0",
"line_length": "88",
"uses_django": "y",
"_template": "https://github.com/escaped/cookiecutter-pypackage.git"
}
},
"directory": null
}
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release

on:
push:
tags:
- '*'

jobs:
release:
name: Create release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Get version from tag
id: tag_name
run: |
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/}
shell: bash
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ steps.tag_name.outputs.current_version }}
path: ./CHANGELOG.md
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.changelog_reader.outputs.version }}
release_name: Release ${{ steps.changelog_reader.outputs.version }}
body: ${{ steps.changelog_reader.outputs.changes }}
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}

publish:
name: Build and publish Python distributions to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install pep517
run: |
python -m pip install pep517
- name: Build a binary wheel and a source tarball
run: |
python -m pep517.build . --source --binary --out-dir dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_token }}

71 changes: 71 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Test & Lint

on:
pull_request:
push:
branches:
- master

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8.5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Lint
run: poetry run pre-commit run -a

test:
name: Test
runs-on: ${{ matrix.platform }}
strategy:
max-parallel: 4
matrix:
platform: [ubuntu-latest]
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions coveralls
sudo apt-get install -y ffmpeg
- name: Test with tox
run: tox
env:
PLATFORM: ${{ matrix.platform }}
- name: coveralls
run: coveralls
env:
COVERALLS_PARALLEL: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

coveralls:
needs: [test]
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install coveralls
- name: coveralls
run: coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Loading

0 comments on commit 509eeec

Please sign in to comment.