Skip to content
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.10
- name: Install
run: |
python -m pip install --upgrade pip setuptools
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.10
- name: Install
run: |
python -m pip install --upgrade pip setuptools
Expand Down
71 changes: 1 addition & 70 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
runs-on: [ubuntu-latest]

steps:
Expand Down Expand Up @@ -114,72 +114,3 @@ jobs:
KCIDB_HOOKS: "pre-commit"
- name: Validate test catalog
run: kcidb-tests-validate --urls < tests.yaml

check_deployment:

needs: check_python
runs-on: ubuntu-latest
environment: staging
steps:
- name: Check credentials
env:
GCLOUD_PROJECT: ${{ secrets.GCLOUD_PROJECT }}
GCLOUD_SA_KEY: ${{ secrets.GCLOUD_SA_KEY }}
run: |
# Check credentials
CREDENTIALS_PRESENT=true
function check() {
if eval "test -z \"\$$1\""; then
echo "$1 secret is missing." >&2
CREDENTIALS_PRESENT=false
fi
}
check GCLOUD_PROJECT
check GCLOUD_SA_KEY
if "$CREDENTIALS_PRESENT"; then
echo "All required credentials are present, continuing." >&2
else
echo "Required credentials are missing, aborting." >&2
fi
"$CREDENTIALS_PRESENT"
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install
run: |
python -m pip install --upgrade pip setuptools
sed -i -e "s|kcidb-io@[^\"]*|${KCIDB_IO_URL}|" requirements.txt setup.py
pip3 install --upgrade '.[dev]'
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v2.1.1
with:
project_id: ${{ secrets.GCLOUD_PROJECT }}
credentials_json: ${{ secrets.GCLOUD_SA_KEY }}
create_credentials_file: true
export_environment_variables: true
- name: Setup Google Cloud SDK
uses: google-github-actions/setup-gcloud@v2.1.0
- name: Deploy, Test, and Withdraw
run: |
status=0
declare -a args=(
"kernelci-staging" "gh${{ github.run_id }}"
--smtp-mocked --test
)
declare -a env_args=(
"${args[@]}" --heavy-asserts --log-level=DEBUG
)

./cloud deploy "${env_args[@]}" --verbose &&
KCIDB_DEPLOYMENT="This deployment is empty" \
./cloud shell "${env_args[@]}" -- \
pytest --tb=native --verbosity=2 --log-level=DEBUG \
--durations=0 --durations-min=1 ||
status=$((status || $?))

./cloud withdraw "${args[@]}" --verbose || status=$((status || $?))

exit "$status"
Loading