Skip to content

Commit

Permalink
Add 3.2.0 facades and update versioning. (#874)
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmanuel-tirado authored Jun 7, 2023
1 parent 23380f5 commit 3ef0ad0
Show file tree
Hide file tree
Showing 17 changed files with 54,444 additions and 486 deletions.
132 changes: 66 additions & 66 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ jobs:
- "3.9"
- "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: Install dependencies
run: pip install tox
- name: Run linter
run: tox -e lint
- name: Check out code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox
- name: Run linter
run: tox -e lint

unit-tests:
needs: lint
Expand All @@ -33,17 +33,17 @@ jobs:
- "3.9"
- "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: Install dependencies
run: pip install tox
- name: Run unit tests
run: tox -e py3
- name: Check out code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox
- name: Run unit tests
run: tox -e py3

integration:
name: Integration
needs: [lint, unit-tests]
Expand All @@ -52,52 +52,52 @@ jobs:
strategy:
matrix:
python:
# We will reduce the workload to 3.10 to
# We will reduce the workload to 3.10 to
# save some resources for now.
# - "3.9"
- "3.10"
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup operator environment
uses: charmed-kubernetes/actions-operator@main
with:
provider: lxd
juju-channel: 3.1/stable
# 2023-01-11 Commented until we discover a
# clear approach for this.
# - name: Set proxy in controller
# run: |
# set -euxo pipefail
# # build a squid config file
# CONTROLLER_IP=$(juju list-controllers --format yaml | yq '.controllers[.current-controller].recent-server' | awk -F '[:]' '{print $1}');
# echo "Controller IP is: $CONTROLLER_IP"
# PROXY=$CONTROLLER_IP:3128
# echo "Proxy address is: $PROXY"
# echo "acl all src all" > squid.conf
# echo "http_access allow all" >> squid.conf
# echo "http_port $PROXY" >> squid.conf
# cat squid.conf
# # copy to the controller and reconfigure it
# juju status -m controller
# juju switch controller
# juju ssh 0 "sudo apt-get install squid -y"
# juju scp squid.conf 0:/tmp/squid.conf
# juju ssh 0 "sudo mv /tmp/squid.conf /etc/squid/squid.conf"
# juju ssh 0 "sudo squid -k reconfigure"
# # Test curl after waiting
# sleep 10
# echo "Test proxy access"
# curl -s -o /dev/null -w "%{http_code}" --proxy http://$PROXY https://charmhub.io
# # set model defaults
# juju model-defaults apt-http-proxy=$PROXY apt-https-proxy=$PROXY juju-http-proxy=$PROXY juju-https-proxy=$PROXY snap-http-proxy=$PROXY snap-https-proxy=$PROXY
# juju model-defaults
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox
- name: Run integration
# Force one single concurrent test
run: tox -e integration -- -n 1
- name: Check out code
uses: actions/checkout@v3
- name: Setup operator environment
uses: charmed-kubernetes/actions-operator@main
with:
provider: lxd
juju-channel: 3.2/stable
# 2023-01-11 Commented until we discover a
# clear approach for this.
# - name: Set proxy in controller
# run: |
# set -euxo pipefail
# # build a squid config file
# CONTROLLER_IP=$(juju list-controllers --format yaml | yq '.controllers[.current-controller].recent-server' | awk -F '[:]' '{print $1}');
# echo "Controller IP is: $CONTROLLER_IP"
# PROXY=$CONTROLLER_IP:3128
# echo "Proxy address is: $PROXY"
# echo "acl all src all" > squid.conf
# echo "http_access allow all" >> squid.conf
# echo "http_port $PROXY" >> squid.conf
# cat squid.conf
# # copy to the controller and reconfigure it
# juju status -m controller
# juju switch controller
# juju ssh 0 "sudo apt-get install squid -y"
# juju scp squid.conf 0:/tmp/squid.conf
# juju ssh 0 "sudo mv /tmp/squid.conf /etc/squid/squid.conf"
# juju ssh 0 "sudo squid -k reconfigure"
# # Test curl after waiting
# sleep 10
# echo "Test proxy access"
# curl -s -o /dev/null -w "%{http_code}" --proxy http://$PROXY https://charmhub.io
# # set model defaults
# juju model-defaults apt-http-proxy=$PROXY apt-https-proxy=$PROXY juju-http-proxy=$PROXY juju-https-proxy=$PROXY snap-http-proxy=$PROXY snap-https-proxy=$PROXY
# juju model-defaults
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox
- name: Run integration
# Force one single concurrent test
run: tox -e integration -- -n 1
114 changes: 57 additions & 57 deletions .github/workflows/test_candidate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Nightly release candidate testing

on:
schedule:
- cron: "0 0 * * *" # Run at 12AM UTC, every day
- cron: "0 0 * * *" # Run at 12AM UTC, every day

jobs:
candidate-integration:
Expand All @@ -16,60 +16,60 @@ jobs:
- "3.9"
- "3.10"
steps:
- name: Download artifact from previous workflow
id: download_artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow_conclusion: success
name: juju-last-candidate-version
if_no_artifact_found: ignore
- name: Check if there is a new candidate
shell: bash
run: |
candidate=$(snap info juju | grep 3.1/candidate | awk '{print $2}')
last_tested=NA
if [ -f juju-last-candidate-version ]; then
last_tested=$(cat juju-last-candidate-version)
fi
echo "Last tested was $last_tested"
echo "Latest juju version found is $candidate"
next_test=NA
if [[ "$candidate" == "^" ]]; then
echo "No candidate to test"
else
if [[ "$candidate" == "$last_tested" ]]; then
echo "Candidate $candidate was already tested"
- name: Download artifact from previous workflow
id: download_artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow_conclusion: success
name: juju-last-candidate-version
if_no_artifact_found: ignore
- name: Check if there is a new candidate
shell: bash
run: |
candidate=$(snap info juju | grep 3.1/candidate | awk '{print $2}')
last_tested=NA
if [ -f juju-last-candidate-version ]; then
last_tested=$(cat juju-last-candidate-version)
fi
echo "Last tested was $last_tested"
echo "Latest juju version found is $candidate"
next_test=NA
if [[ "$candidate" == "^" ]]; then
echo "No candidate to test"
else
echo "Candidate $candidate has to be tested"
next_test="$candidate"
fi
fi
echo "next-test=$next_test" >> $GITHUB_ENV
echo "$next_test" > ~/juju-last-candidate-version
- name: Check out code
uses: actions/checkout@v3
if: ${{ env.next-test != 'NA' }}
- name: Setup operator environment
if: ${{ env.next-test != 'NA' }}
uses: charmed-kubernetes/actions-operator@main
with:
provider: lxd
juju-channel: 3.1/candidate
- name: Setup Python
if: ${{ env.next-test != 'NA' }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
if: ${{ env.next-test != 'NA' }}
run: pip install tox
- name: Run integration
if: ${{ env.next-test != 'NA' }}
# Force one single concurrent test
run: tox -e integration -- -n 1
- name: Upload artifact
if: ${{ env.next-test != 'NA' }}
uses: actions/upload-artifact@v3
with:
name: juju-last-candidate-version
path: ~/juju-last-candidate-version
if [[ "$candidate" == "$last_tested" ]]; then
echo "Candidate $candidate was already tested"
else
echo "Candidate $candidate has to be tested"
next_test="$candidate"
fi
fi
echo "next-test=$next_test" >> $GITHUB_ENV
echo "$next_test" > ~/juju-last-candidate-version
- name: Check out code
uses: actions/checkout@v3
if: ${{ env.next-test != 'NA' }}
- name: Setup operator environment
if: ${{ env.next-test != 'NA' }}
uses: charmed-kubernetes/actions-operator@main
with:
provider: lxd
juju-channel: 3.2/candidate
- name: Setup Python
if: ${{ env.next-test != 'NA' }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
if: ${{ env.next-test != 'NA' }}
run: pip install tox
- name: Run integration
if: ${{ env.next-test != 'NA' }}
# Force one single concurrent test
run: tox -e integration -- -n 1
- name: Upload artifact
if: ${{ env.next-test != 'NA' }}
uses: actions/upload-artifact@v3
with:
name: juju-last-candidate-version
path: ~/juju-last-candidate-version
Loading

0 comments on commit 3ef0ad0

Please sign in to comment.