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

Crowdin CI v2 (crowdin/github-action@v1 attempt) #12936

Closed
wants to merge 16 commits into from
Closed

Conversation

wackerow
Copy link
Member

@wackerow wackerow commented May 9, 2024

Description

  • Updates crowdin-ci.ts (previously get-translations.ts) with new scripts
  • Implements crowdin/github-actions@v1 to handle build/await/download steps
  • build-crowdin workflow (triggerBuild.ts) deprecated
  • Fetches bucket/directory IDs before performing import (instead of relying on async workflows)
  • Trigger coderabbitai if markdown warnings found

extract env vars to single-declaration; remove sleep and replace with awaitLatestBuild script; move timing to AM,
this is updated with each import cycle and committed; large number of build minutes and not required here
in lieu of incorporation into CI/CD workflow; keeps triggerBuild.ts script
Repeat calls could produce the same build ID. `import "dotenv/config"` not needed when called from an action
Requires getting process.env.BUILD_ID from previous script in workflow (triggerBuild.ts)
replaces build, await and download steps
@github-actions github-actions bot added needs review 👀 tooling 🔧 Changes related to tooling of the project labels May 9, 2024
Copy link

netlify bot commented May 9, 2024

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 2d2d82b
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/6644b49455baa80008407856
😎 Deploy Preview https://deploy-preview-12936--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 51 (🔴 down 5 from production)
Accessibility: 92 (no change from production)
Best Practices: 94 (🔴 down 4 from production)
SEO: 95 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@wackerow wackerow marked this pull request as draft May 9, 2024 15:01
@wackerow wackerow mentioned this pull request May 15, 2024
1 task
Comment on lines +11 to +14
env:
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved these up to avoid repeating them during each needed step

Comment on lines +45 to +48
- name: Build Crowdin project
uses: crowdin/github-actions@v1
with:
download_translations: true
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to copilot, the crowdin/github-actions@v1 should download the lang folders to ./crowdin, ie. ./crowdin/fa/**

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sadly after testing, this action does not do what we need it to do. It requires uploading files, and then will only download the translations for those files and place them in a single PR. Placing back in draft until reversion of crowdin/github-action@v1 usage.


# Prepare bucket ids
- name: Get latest translation bucket directory ids
run: npx ts-node -O '{"module":"commonjs"}' ./src/scripts/crowdin/translations/getBucketDirectoryIds.ts
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run the script to get the up-to-date bucket directory id's

@wackerow wackerow changed the title Crowdin CD v2.1 Crowdin CD v2 May 15, 2024
@wackerow wackerow marked this pull request as ready for review May 15, 2024 13:11
@wackerow
Copy link
Member Author

Marked as ready for review from a code side. Not sure the best way to test this though since it involved our GitHub repo and folder/file structure, Crowdin project, API keys and GH actions. We may need to just give this a shot in prod and see how it goes (doesn't touch any website code/content directly; would only be running background actions and posting PRs).

@wackerow wackerow changed the title Crowdin CD v2 Crowdin CI v2 May 17, 2024
@wackerow wackerow marked this pull request as draft May 18, 2024 13:43
@wackerow wackerow changed the title Crowdin CI v2 Crowdin CI v2 (crowdin/github-action@v1 attempt) May 18, 2024
@wackerow
Copy link
Member Author

Given limitations of crowdin action, closing in lieu of #12922

@wackerow wackerow closed this May 18, 2024
@github-actions github-actions bot added the abandoned This has been abandoned or will not be implemented label May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abandoned This has been abandoned or will not be implemented tooling 🔧 Changes related to tooling of the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant