Skip to content

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

@achimr

Description

@achimr

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions