-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from gmrukwa/develop
Release 2.1.8
- Loading branch information
Showing
96 changed files
with
1,849 additions
and
1,571 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM spectreteam/python_msi:v5.0.0 | ||
|
||
RUN pip install --no-cache-dir --upgrade \ | ||
setuptools \ | ||
wheel \ | ||
twine | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
name: 'Build Python distribution' | ||
description: 'Builds Python package distribution for upload' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
pip install --no-cache-dir -r requirements.txt | ||
|
||
python setup.py sdist bdist_wheel | ||
|
||
ls dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM alpine:3 | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: 'Patch version number' | ||
description: 'Patches version number of the Python package' | ||
inputs: | ||
packageInitFile: | ||
description: '__init__.py file that should be patched' | ||
required: true | ||
isAlpha: | ||
description: 'if true, package will be annotated with alpha' | ||
required: true | ||
default: false | ||
isBeta: | ||
description: 'if true, package will be annotated with beta' | ||
required: true | ||
default: false | ||
version: | ||
description: 'version of the Python package' | ||
required: true | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
args: | ||
- ${{ inputs.packageInitFile }} | ||
- ${{ inputs.isAlpha }} | ||
- ${{ inputs.isBeta }} | ||
- ${{ inputs.version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh -l | ||
|
||
TARGET=$1 | ||
IS_ALPHA=$2 | ||
IS_BETA=$3 | ||
VERSION=$4 | ||
|
||
if $IS_ALPHA; then | ||
SUFIX=a | ||
elif $IS_BETA; then | ||
SUFIX=b | ||
fi | ||
|
||
VERSION=${VERSION}${SUFIX:+$SUFIX} | ||
sed -i "1s/.*/__version__ = \"${VERSION}\"/" ${TARGET} | ||
cat ${TARGET} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: Build and push deployment images | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
schedule: | ||
- cron: '0 17 * * *' | ||
|
||
|
||
env: | ||
MAJOR: ${{ 2 }} | ||
MINOR: ${{ 1 }} | ||
FIXUP: ${{ 8 }} | ||
PACKAGE_INIT_FILE: ${{ 'divik/__init__.py' }} | ||
DOCKER_REPO: ${{ 'gmrukwa/divik' }} | ||
IS_ALPHA: ${{ github.event_name == 'pull_request' }} | ||
IS_BETA: ${{ github.event_name == 'push' && endsWith(github.event.ref, 'heads/develop') }} | ||
|
||
|
||
jobs: | ||
push_images: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Embed version to package | ||
uses: ./.github/actions/patch-version | ||
with: | ||
packageInitFile: ${{ env.PACKAGE_INIT_FILE }} | ||
isAlpha: ${{ env.IS_ALPHA }} | ||
isBeta: ${{ env.IS_BETA }} | ||
version: ${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.FIXUP }} | ||
- name: Authenticate to Docker Hub | ||
run: echo $DOCKER_PASSWORD | docker login -u $DOCKER_USER --password-stdin | ||
env: | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
DOCKER_USER: ${{ secrets.DOCKER_USER }} | ||
- name: Build image | ||
run: | | ||
docker build \ | ||
--file docker/deploy.dockerfile \ | ||
--tag deployment \ | ||
. | ||
- name: Push annotated images | ||
run: | | ||
if $IS_ALPHA; then | ||
STAGE=alpha | ||
elif $IS_BETA; then | ||
STAGE=beta | ||
fi | ||
echo "STAGE=$STAGE" | ||
docker tag deployment $DOCKER_REPO:$MAJOR.$MINOR.$FIXUP${STAGE:+-$STAGE} | ||
docker tag deployment $DOCKER_REPO:$MAJOR.$MINOR${STAGE:+-$STAGE} | ||
docker tag deployment $DOCKER_REPO:$MAJOR${STAGE:+-$STAGE} | ||
docker push $DOCKER_REPO:$MAJOR.$MINOR.$FIXUP${STAGE:+-$STAGE} | ||
docker push $DOCKER_REPO:$MAJOR.$MINOR${STAGE:+-$STAGE} | ||
docker push $DOCKER_REPO:$MAJOR${STAGE:+-$STAGE} | ||
- name: Push latest image for master branch | ||
if: github.event_name == 'push' && endsWith(github.event.ref, 'heads/master') | ||
run: | | ||
docker tag deployment $DOCKER_REPO:latest | ||
docker push $DOCKER_REPO:latest | ||
push_pypi_package: | ||
|
||
if: github.event_name != 'schedule' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Embed version to package | ||
uses: ./.github/actions/patch-version | ||
with: | ||
packageInitFile: ${{ env.PACKAGE_INIT_FILE }} | ||
isAlpha: ${{ env.IS_ALPHA }} | ||
isBeta: ${{ env.IS_BETA }} | ||
version: ${{ env.MAJOR }}.${{ env.MINOR }}.${{ env.FIXUP }} | ||
- name: Build Python package | ||
uses: ./.github/actions/build-python-dist | ||
- name: Publish Python package | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Run unit tests in MCR environment | ||
|
||
on: push | ||
|
||
jobs: | ||
tests: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Run unit tests in MCR environment | ||
run: docker build . --file docker/unittest.dockerfile --tag unittest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# .readthedocs.yml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Build documentation in the docs/ directory with Sphinx | ||
sphinx: | ||
configuration: docs/conf.py | ||
|
||
# Build documentation with MkDocs | ||
#mkdocs: | ||
# configuration: mkdocs.yml | ||
|
||
# Optionally build your docs in additional formats such as PDF and ePub | ||
formats: all | ||
|
||
# Optionally set the version of Python and requirements required to build your docs | ||
python: | ||
version: 3.5 | ||
install: | ||
- requirements: requirements.txt | ||
- requirements: docs/requirements.txt |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.