Skip to content

Pub Sub registeration workflow for e2e #890

Pub Sub registeration workflow for e2e

Pub Sub registeration workflow for e2e #890

# Copyright 2022 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
#
# http://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.
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Pub Sub registeration workflow for e2e
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
env:
PROJECT_ID: gcp-classroom-dev
GKE_POD_SA_KEY: ${{ secrets.GKE_CLASSROOM_POD_SA_KEY }}
jobs:
register_classroom:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
python-version: [3.9]
target-folder: [e2e]
steps:
- uses: actions/checkout@v3
- name: "Set up Gcloud auth"
id: "gcloud_auth"
uses: "google-github-actions/auth@v1"
with:
credentials_json: "${{ secrets.CLP_DEV_SA_KEY }}"
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v1"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
BASE_DIR=$(pwd)
cd ${{ matrix.target-folder }}
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f $BASE_DIR/common/requirements.txt ]; then pip install -r $BASE_DIR/common/requirements.txt; fi
- name: Run python script
run: |
BASE_DIR=$(pwd)
cd ${{ matrix.target-folder }}/utils
python classroom_registration_e2e.py