Skip to content

Tuning works! A fail safe was written in case compute time cant be fo… #106

Tuning works! A fail safe was written in case compute time cant be fo…

Tuning works! A fail safe was written in case compute time cant be fo… #106

Workflow file for this run

name: CI Pipeline
on:
push:
branches:
- main
- experiment-code # Add other branches you want to test
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10.16"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest
# **Check if Secret is Set**
- name: Debug Secrets
run: |
if [ -z "${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_JSON }}" ]; then
echo "❌ SECRET IS EMPTY!"
exit 1
else
echo "✅ SECRET IS SET!"
fi
# **Set up Google Cloud authentication**
- name: Authenticate Google Cloud
run: |
echo '${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_JSON }}' > $HOME/gcloud-key.json
echo "GOOGLE_APPLICATION_CREDENTIALS=$HOME/gcloud-key.json" >> $GITHUB_ENV
gcloud auth activate-service-account --key-file=$HOME/gcloud-key.json
gcloud config set project robust-raster # Replace with your Google Cloud Project ID
# **Verify that GOOGLE_APPLICATION_CREDENTIALS is set correctly**
- name: Verify Environment Variable
run: |
if [ -z "$GOOGLE_APPLICATION_CREDENTIALS" ]; then
echo "❌ GOOGLE_APPLICATION_CREDENTIALS is not set!"
exit 1
else
echo "✅ GOOGLE_APPLICATION_CREDENTIALS is set: $GOOGLE_APPLICATION_CREDENTIALS"
fi
# **Run Tests**
- name: Run tests
run: pytest tests/