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

ci: re-enable integration tests with mysql-*operator #1013

Merged
merged 14 commits into from
Sep 27, 2023
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
27 changes: 18 additions & 9 deletions .github/workflows/db-charm-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,35 @@ jobs:
charm-repo:
- "canonical/postgresql-operator"
- "canonical/postgresql-k8s-operator"
# TODO: uncomment once we've fixed https://github.com/canonical/operator/issues/987
# - "canonical/mysql-operator"
# - "canonical/mysql-k8s-operator"
- "canonical/mysql-operator"
- "canonical/mysql-k8s-operator"

steps:
- name: Checkout the ${{ matrix.charm-repo }} repository
uses: actions/checkout@v3
with:
repository: ${{ matrix.charm-repo }}

- name: Checkout the operator repository
uses: actions/checkout@v3
with:
path: myops
tonyandrewmeyer marked this conversation as resolved.
Show resolved Hide resolved

- name: Install patch dependencies
run: pip install poetry~=1.6

- name: Update 'ops' dependency in test charm to latest
run: |
sed -i -e "/^ops[ ><=]/d" -e "/canonical\/operator/d" -e "/#egg=ops/d" requirements.txt
echo -e "\ngit+$GITHUB_SERVER_URL/$GITHUB_REPOSITORY@$GITHUB_SHA#egg=ops" >> requirements.txt
if [ -e "requirements.txt" ]; then
sed -i -e "/^ops[ ><=]/d" -e "/canonical\/operator/d" -e "/#egg=ops/d" requirements.txt
echo -e "\ngit+$GITHUB_SERVER_URL/$GITHUB_REPOSITORY@$GITHUB_SHA#egg=ops" >> requirements.txt
else
sed -i -e "s/^ops[ ><=].*/ops = {path = \"myops\"}/" pyproject.toml
poetry lock
tonyandrewmeyer marked this conversation as resolved.
Show resolved Hide resolved
fi

- name: Install dependencies
run: pip install tox==4.2.8
run: pip install tox~=4.2

- name: Run the charm's unit tests
run: tox -vve unit

- name: Run the charm's static analysis checks
run: tox -vve static-charm
11 changes: 6 additions & 5 deletions .github/workflows/framework-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
uses: actions/setup-python@v2

- name: Install tox
run: pip install tox
run: pip install tox~=4.2

- name: Run linting
run: tox -e lint
Expand All @@ -26,7 +26,7 @@ jobs:
uses: actions/setup-python@v2

- name: Install tox
run: pip install tox
run: pip install tox~=4.2

- name: Run static type checks
run: tox -e static
Expand All @@ -47,7 +47,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install tox
run: pip install tox
run: pip install tox~=4.2

- name: Run unit tests
run: tox -e unit
Expand All @@ -73,7 +73,7 @@ jobs:
go-version: "1.20"

- name: Install tox
run: pip install tox
run: pip install tox~=4.2

- name: Install Pebble
run: go install github.com/canonical/pebble/cmd/pebble@latest
Expand All @@ -88,7 +88,7 @@ jobs:
- name: Run Real pebble tests
run: tox -e unit -- -k RealPebble
env:
RUN_REAL_PEBBLE_TESTS: 1
RUN_REAL_PEBBLE_TESTS: 1
PEBBLE: /tmp/pebble

pip-install:
Expand All @@ -106,3 +106,4 @@ jobs:
- name: Test 'pip install'
# Shouldn't happen, but pip install will fail if ls returns multiple lines
run: pip install $(ls dist/ops*.gz)

2 changes: 1 addition & 1 deletion .github/workflows/observability-charm-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
echo -e "\ngit+$GITHUB_SERVER_URL/$GITHUB_REPOSITORY@$GITHUB_SHA#egg=ops" >> requirements.txt

- name: Install dependencies
run: pip install tox
run: pip install tox~=4.2

- name: Run the charm's unit tests
run: tox -vve unit
Expand Down
Loading