Skip to content

Commit

Permalink
Update centrally managed files (#49)
Browse files Browse the repository at this point in the history
* update .github/workflows/check.yaml

* update .gitignore

* update .github/workflows/check.yaml

* update .gitignore

* update .github/workflows/check.yaml

* update .gitignore

* update .github/workflows/check.yaml

* update .gitignore

* update .github/workflows/check.yaml

* update .gitignore

* update .github/workflows/check.yaml

* update .gitignore

* update .github/workflows/check.yaml

* update .gitignore

* update .github/workflows/check.yaml

* update .gitignore

* update .github/workflows/check.yaml

* update .gitignore

* update .github/workflows/check.yaml

* update .gitignore

* update .github/workflows/check.yaml

---------

Co-authored-by: soleng-terraform[bot] <168111096+soleng-terraform[bot]@users.noreply.github.com>
Co-authored-by: Samuel Allan <[email protected]>
  • Loading branch information
soleng-terraform[bot] and samuelallan72 authored Sep 26, 2024
1 parent 2cee591 commit c53e733
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 16 deletions.
63 changes: 57 additions & 6 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,70 @@ concurrency:
cancel-in-progress: true

jobs:
lint-unit:
uses: canonical/bootstack-actions/.github/workflows/lint-unit.yaml@v2
lint:
name: Lint
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.10"]
with:
python-version: ${{ matrix.python-version }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
# pin tox to the current major version to avoid
# workflows breaking all at once when a new major version is released.
python -m pip install 'tox<5'
- name: Run linters
run: tox -e lint

unit:
name: Unit
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.10"]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install 'tox<5'
- name: Run unit tests
run: tox -e unit

func:
needs: lint-unit
needs:
- lint
- unit
name: functional tests
runs-on: ${{ matrix.runs-on }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
runs-on: [[ubuntu-22.04]]
test-command: ['tox -e func -- --series focal -v', 'tox -e func -- --series jammy -v']
test-command: ['tox -e func -- -v --series focal', 'tox -e func -- -v --series jammy']
juju-channel: ["3.4/stable"]
steps:

Expand Down Expand Up @@ -76,6 +121,12 @@ jobs:

- name: Run tests
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$')"
Expand Down
52 changes: 42 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,45 @@
.jujuignore
.vscode/
# 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
.tox
reports/
**/report/
htmlcov/
.mypy_cache

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

# Build artefacts
output/
.build/
.tox/
.venv/
build/
env/
venv/
__pycache__/
*.charm
.coverage
report/
.pytest_cache
*.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.

0 comments on commit c53e733

Please sign in to comment.