Skip to content

[Prototyping] Play around with google drive and AWS testing with github secrets #5

[Prototyping] Play around with google drive and AWS testing with github secrets

[Prototyping] Play around with google drive and AWS testing with github secrets #5

# .github/workflows/ci.yml (excerpt)
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
schedule:
# Weekly cron job at 12:00 AM UTC on Mondays.
# This will only run on main by default.
- cron: '0 0 * * 1'
jobs:
test_connections:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Expose Google-Drive secrets
run: |
# 1) materialise the JSON file
echo "${{ secrets.GDRIVE_SERVICE_ACCOUNT_JSON }}" > $HOME/gdrive.json
# 2) make both paths available to the test process
echo "GDRIVE_SERVICE_ACCOUNT_FILE=$HOME/gdrive.json" >> $GITHUB_ENV
echo "GDRIVE_ROOT_FOLDER_ID=${{ secrets.GDRIVE_ROOT_FOLDER_ID }}" >> $GITHUB_ENV
- name: Run pytest
env:
CI: "true" # so your skip-marker sees CI=true
run: pytest -q -k test_gdrive_connection