Skip to content

PLaying around with github secrents and connections. #1

PLaying around with github secrents and connections.

PLaying around with github secrents and connections. #1

# .github/workflows/ci.yml (excerpt)
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install deps
run: pip install -r requirements.txt
- 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