I am trying to find the way to test python scripts using Sheets API.
Sheets API is to read and write Google Spread Sheet, which requires to load credential information via json file in the script.
Here is an example:
import gspread import json # ---- create Google Drive Service from apiclient.discovery import build import httplib2 from oauth2client.service_account import ServiceAccountCredentials class sheetConnector: def __init__(self): scope = ['https://spreadsheets.google.com/feeds','https://www.googleapis.com/auth/drive'] #Load credentials credentials = ServiceAccountCredentials.from_json_keyfile_name('XXX.json', scope) ...
It is not good to add a file with credential information to the GitHub repository to run CircleCI processes.
But it seems that there is no way to add file through the web console of CircleCI like environment variables.
I would appreciate if there is any way to add conf file and use it in the test process securely.