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

Add conditional logic to allow CI and Make #252

Merged
merged 20 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 5 additions & 1 deletion .github/workflows/_charm-linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@ jobs:
- name: Run linters
run: |
cd ${{ inputs.charm-path }}
[ -f tox.ini ] && tox -vve lint || make lint
if [ -f tox.ini ]; then
tox -vve lint
else
make lint
fi
12 changes: 10 additions & 2 deletions .github/workflows/_charm-static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ jobs:
- name: Run static analysis for /lib for 3.8
run: |
cd ${{ inputs.charm-path }}
[ -f tox.ini ] && tox -vve static-lib || make static
if [ -f tox.ini ]; then
tox -vve static-lib
else
make static
fi
static-charm:
name: Static Analysis of Charm
runs-on: ubuntu-latest
Expand All @@ -47,4 +51,8 @@ jobs:
- name: Run static analysis (charm)
run: |
cd ${{ inputs.charm-path }}
[ -f tox.ini ] && tox -vve static-charm || make static
if [ -f tox.ini ]; then
tox -vve static-charm
else
make static
fi
6 changes: 5 additions & 1 deletion .github/workflows/_charm-tests-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ jobs:
- name: Run integration tests
run: |
cd ${{ inputs.charm-path }}
[ -f tox.ini ] && tox -vve integration || make integration
if [ -f tox.ini ]; then
tox -vve integration
else
make integration
fi
- name: Dump logs
if: failure()
uses: canonical/charming-actions/dump-logs@main
6 changes: 5 additions & 1 deletion .github/workflows/_charm-tests-scenario.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@ jobs:
- name: Run tests
run: |
cd ${{ inputs.charm-path }}
[ -f tox.ini ] && tox -e scenario || make scenario || echo "Skipping scenario..."
if [ -f tox.ini ]; then
tox -e scenario
else
make scenario
fi
6 changes: 5 additions & 1 deletion .github/workflows/_charm-tests-unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@ jobs:
- name: Run tests
run: |
cd ${{ inputs.charm-path }}
[ -f tox.ini ] && tox -e unit || make unit
if [ -f tox.ini ]; then
tox -e unit
else
make unit
fi