Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update centrally managed files #36

Closed
wants to merge 10 commits into from
26 changes: 20 additions & 6 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.8", "3.10"]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -53,7 +53,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.8", "3.10"]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -83,19 +83,19 @@ jobs:
fail-fast: false
matrix:
runs-on: [[ubuntu-22.04]]
test-command: ['make functional']
test-command: ['tox -e func']
juju-channel: ["3.4/stable"]
steps:

- uses: actions/checkout@v4
with:
submodules: true

# arm64 runners don't have make or gcc installed by default
# arm64 runners don't have gcc installed by default
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y make gcc
sudo apt install -y gcc

- name: Setup Python
uses: actions/setup-python@v5
Expand All @@ -116,8 +116,22 @@ jobs:
echo "TEST_MODEL_CONSTRAINTS=arch=arm64" >> "$GITHUB_ENV"
fi

- name: Build the charm
run: charmcraft -v pack

- name: Run tests
run: ${{ matrix.test-command }}
run: |
# These variables are for a consistent method to find the charm file(s) across all projects.
# It is designed to work both with charms that output one file per base,
# and charms that output a single file to run on all bases.
# Not all charms will use them, and for some charms the variables will resolve to the same file.
export CHARM_PATH_NOBLE="$(pwd)/$(ls | grep '.*24.04.*\.charm$')"
echo "$CHARM_PATH_NOBLE"
export CHARM_PATH_JAMMY="$(pwd)/$(ls | grep '.*22.04.*\.charm$')"
echo "$CHARM_PATH_JAMMY"
export CHARM_PATH_FOCAL="$(pwd)/$(ls | grep '.*20.04.*\.charm$')"
echo "$CHARM_PATH_FOCAL"
${{ matrix.test-command }}
env:
TEST_JUJU3: "1" # https://github.com/openstack-charmers/zaza/pull/653
TEST_JUJU_CHANNEL: ${{ matrix.juju-channel }}
Expand Down
52 changes: 43 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,45 @@
.jujuignore
.vscode/
build/
env/
venv/
.build/
.venv/
.tox/
# This file is centrally managed as a template file in https://github.com/canonical/solutions-engineering-automation
# To update the file:
# - Edit it in the canonical/solutions-engineering-automation repository.
# - Open a PR with the changes.
# - When the PR merges, the soleng-terraform bot will open a PR to the target repositories with the changes.

# Python Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Test files and directories
.pytest_cache/
.coverage
__pycache__
.tox
reports/
**/report/
htmlcov/
.mypy_cache

# python virtual environments (for local dev)
.venv
venv
env

# Build artefacts
output/
.build/
build/
*.charm
*.snap
# python build artefacts
deb_dist/
dist/
*.egg-info/

# Log files
*.log

# general backup files
*~
*.bak

# Note: for editor-specific files, please don't add them here, as they are specific to your environment, not the project.
# Instead, consider using a global gitignore on your workstation.