Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/BugReport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ body:
id: info
attributes:
label: "Reproduce / Test"
description: "Please add valid Python code to reproduce the bug. This will be used as a test for QAing later on."
description: "Please add valid Python code to reproduce the bug. This will be used as a test for QAing later on.

Please provide a simplified reproducer, and if it's possible please refrain from providing a "clone this repository and run the integration tests to see the problem" type of a reproducer. Thanks!"
render: python
validations:
required: true
18 changes: 18 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,24 @@ jobs:
tox -e lint
./scripts/copyright.sh

build-test:
name: Build test
runs-on: ubuntu-latest
strategy:
matrix:
python:
- "3.10"
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Run build test target
run: |
make build-test

unit-tests:
needs: lint
name: Unit tests
Expand Down
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BIN := .tox/py3/bin
PY := $(BIN)/python3
PIP := $(BIN)/pip3
VERSION := $(shell $(PY) -c "from juju.version import CLIENT_VERSION; print(CLIENT_VERSION)")
VERSION := $(shell python3 -c "from juju.version import CLIENT_VERSION; print(CLIENT_VERSION)")

.PHONY: clean
clean:
Expand Down Expand Up @@ -40,6 +40,16 @@ lint:
docs:
tox -e docs

.PHONY: build-test
build-test:
rm -rf venv
python3 -m venv venv
. venv/bin/activate
python3 setup.py sdist
pip install ./dist/juju-${VERSION}.tar.gz
python3 -c "from juju.controller import Controller"
rm ./dist/juju-${VERSION}.tar.gz

.PHONY: release
release:
git fetch --tags
Expand Down