Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Translate doesn't get unit tested in CI (Github Actions) #1

Open
achimr opened this issue Nov 18, 2022 · 1 comment
Open

Google Translate doesn't get unit tested in CI (Github Actions) #1

achimr opened this issue Nov 18, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@achimr
Copy link
Owner

achimr commented Nov 18, 2022

Root cause:
The method to authenticate Github Actions code to Google Cloud is described here (this is code provided by Google). After a checkout of the repository, the authentication methods create temporary JSON files in the repository folders. However, nbdev 2.0 CI code checks out the repository again using the Github actions/checkout@v3 with the default clean=true option, overwriting the Google Cloud JSON authentication files. Subsequent calls to Google Cloud therefore cannot be authenticated anymore.

The proper way to fix this would be:

  1. Fork fastai/workflows
  2. Add an option clean_repo to fastai/workflows/nbdev-ci/actions.yml to allow setting the clean option for actions/checkout@v3 (default: true)
  3. Add the code to add Google Cloud authentication to this repository in .github/workflows/test.yaml with the option clean_repo=false set
  4. Test this fix with the forked fastai workflows
  5. Submit PR to fastai
  6. After PR is accepted change .github/workflows/test.yaml to use fastai/workflows again instead of the fork
@achimr achimr added the enhancement New feature or request label Nov 18, 2022
@achimr achimr self-assigned this Nov 18, 2022
@achimr
Copy link
Owner Author

achimr commented Nov 18, 2022

The workaround is to run unit tests with nbdev_test on a local Jupyter notebook instance (ideally with GPU support) or on Google Colab (also ideally with GPU runtime)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant