Skip to content

Commit

Permalink
Merge pull request #67 from matuskosut/libjuju-2.8
Browse files Browse the repository at this point in the history
Libjuju 2.8.0
  • Loading branch information
matuskosut authored Oct 31, 2021
2 parents 9ff3131 + 4719b94 commit f79692d
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 45 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ jobs:
python-version: [3.5, 3.6, 3.7]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
- name: Lint with flake8
run: |
pip install flake8
python3 -m pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --ignore=D203,D100,D103,D202,D200,W504 --max-complexity=10 --max-line-length=120 --statistics
- name: Test with pytest
run: |
pip install pytest
python3 -m pip install pytest
pytest --tb native -ra -v -s
9 changes: 4 additions & 5 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.6'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
python3 -m pip install --upgrade pip
python3 -m pip install setuptools wheel twine
- name: Build
run: python setup.py sdist bdist_wheel
- name: Publish
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/snappublish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Upload Snap Package

on: push
# on:
# create:
# tags:
# - refs/tags/*

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Set up lxd
run: |
sudo usermod --append --groups lxd $(whoami)
sudo su $(whoami) -c 'lxd init --auto'
sudo su $(whoami) -c 'lxc network set lxdbr0 ipv6.address none'
- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v1
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install tox
- name: Render snapcraft config
run: |
export SNAPCRAFT_PROJECT_VERSION=$(cat VERSION)
envsubst < snap/snapcraft.yaml.tpl > snap/snapcraft.yaml
rm snap/snapcraft.yaml.tpl
- name: Build snap
run: |
sg lxd -c 'snapcraft --use-lxd'
- uses: actions/upload-artifact@v2
with:
name: jujuna
path: |
jujuna*.snap
# https://circleci.com/docs/2.0/build-publish-snap-packages/
# - name: Publish snap
# env:
# SNAPCRAFT_LOGIN_FILE: ${{ secrets.SNAPCRAFT_TOKEN }}
# run: |
# mkdir .snapcraft
# echo $SNAPCRAFT_LOGIN_FILE | base64 --decode --ignore-garbage > .snapcraft/snapcraft.cfg
# snapcraft push *.snap --release edge
# # [[ "${GITHUB_REF}" =~ refs/tags/$(cat VERSION) ]] && snapcraft push *.snap --release edge || echo "not publishing"
# shell: bash
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

snap/snapcraft.yaml

.vagrant
vagrant.retry

Expand Down Expand Up @@ -104,4 +106,4 @@ venv.bak/
.DS_Store

# Snapcraft
*.snap
*.snap
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.8
2.8.0
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
"Environment :: Console"
Expand Down
6 changes: 3 additions & 3 deletions snap/snapcraft.yaml.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: jujuna
base: core18
base: core20
version: "${SNAPCRAFT_PROJECT_VERSION}"
summary: Jujuna, continuous deployment, upgrade and testing for Juju.
description: |
Expand All @@ -11,8 +11,8 @@ confinement: strict
parts:
jujuna:
plugin: python
python-version: python3
requirements: ./requirements.txt
requirements:
- ./requirements.txt
source: .
apps:
jujuna:
Expand Down

0 comments on commit f79692d

Please sign in to comment.