forked from labd/django-session-timeout
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
281 additions
and
72 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,68 @@ | ||
name: Python Tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
test: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
tox_env: | ||
- py36-django111 | ||
- py37-django111 | ||
- py36-django22 | ||
- py37-django22 | ||
include: | ||
- python-version: "3.6" | ||
tox_env: py36-django111 | ||
- python-version: "3.7" | ||
tox_env: py37-django111 | ||
- python-version: "3.6" | ||
tox_env: py36-django22 | ||
- python-version: "3.7" | ||
tox_env: py37-django22 | ||
steps: | ||
- name: Install system dependencies | ||
run: | | ||
sudo apt-get install libpq-dev | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip tox | ||
- name: Test with tox | ||
run: | | ||
tox -e ${{ matrix.tox_env }} | ||
- name: Prepare Coverage report | ||
run: tox -e coverage-report | ||
- name: Upload to codecov | ||
uses: codecov/codecov-action@v1.0.2 | ||
with: | ||
token: ${{secrets.CODECOV_TOKEN}} | ||
flags: unittests | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: [test] | ||
steps: | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: "3.7" | ||
- name: Install build requirements | ||
run: | | ||
python -m pip install wheel | ||
- uses: actions/checkout@v1 | ||
- name: Build package | ||
run: python setup.py sdist bdist_wheel | ||
- name: Publish package | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} |
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
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
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,56 @@ | ||
jobs: | ||
- job: UpdateBuildNumber | ||
pool: | ||
vmImage: ubuntu-16.04 | ||
steps: | ||
- script: | | ||
pip3 install --upgrade setuptools | ||
echo "##vso[build.UpdateBuildNumber]`python3 setup.py --version`-$BUILD_BUILDID" | ||
displayName: Set Version number | ||
- job: Test | ||
pool: | ||
vmImage: "ubuntu-16.04" | ||
strategy: | ||
matrix: | ||
python 3.6: | ||
python.version: "3.6" | ||
TOXENV: "py36" | ||
python 3.7: | ||
python.version: "3.7" | ||
TOXENV: "py37" | ||
steps: | ||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: "$(python.version)" | ||
- script: | | ||
python -m pip install --upgrade pip | ||
pip3 install --upgrade setuptools | ||
pip3 install --upgrade tox | ||
pip3 install --upgrade codecov | ||
displayName: "Install testing requirements" | ||
- script: tox -e $(TOXENV) | ||
displayName: "Run tox with TOXENV=$(TOXENV)" | ||
- script: | | ||
tox -e coverage-report | ||
codecov | ||
condition: succeeded() | ||
displayName: "Upload coverage information to codecov.io" | ||
- job: Publish | ||
pool: | ||
vmImage: "ubuntu-16.04" | ||
dependsOn: Test | ||
condition: in(variables['Build.SourceBranch'], 'refs/heads/master') | ||
displayName: "Publish artifacts" | ||
steps: | ||
- task: CopyFiles@2 | ||
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)' | ||
inputs: | ||
SourceFolder: '$(Build.SourcesDirectory)' | ||
Contents: | | ||
**/* | ||
!.git/**/* | ||
TargetFolder: '$(Build.ArtifactStagingDirectory)' | ||
- task: PublishBuildArtifacts@1 | ||
displayName: drop |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[bumpversion] | ||
current_version = 0.0.3 | ||
current_version = 0.0.4 | ||
commit = true | ||
tag = true | ||
tag_name = {new_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
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 |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.0.3' | ||
__version__ = "0.0.4" |
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
Oops, something went wrong.