Skip to content

Cleanup Spanner Test Infra #278

Cleanup Spanner Test Infra

Cleanup Spanner Test Infra #278

# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Cleanup Spanner Test Infra
on:
schedule:
- cron: "0 4 * * *"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
cleanup:
name: Cleanup
runs-on: [self-hosted, it]
timeout-minutes: 30
steps:
- name: Checkout Code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r test-infra/requirements.txt
- name: Run cleanup_pubsub_notifications.py
run: python test-infra/cleanup_pubsub_notifications.py
- name: Run cleanup_spanner_databases.py
run: python test-infra/cleanup_spanner_databases.py
- name: Run delete_spanner_instances.sh
run: bash test-infra/delete_spanner_instances.sh