سير عمل GitHub Actions لتعلّم الآلة
شغّل lint والاختبارات والتدريب مع كل عملية دفع.
سير عمل GitHub Actions لتعلّم الآلة درس مجاني في MLOps Academy على CoddyKit. هذا هو الدرس 2 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في MLOps Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة MLOps Academy 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
Meet GitHub Actions
GitHub Actions runs your scripts on GitHub's servers whenever something happens in your repo, like a push, so you never run CI by hand again. ⚙️
Workflows Live in YAML
A workflow is a YAML file inside .github/workflows. GitHub reads it and follows your instructions step by step on each trigger.
.github/workflows/ml.ymlThe on: Trigger
The on key says when to run. Here it fires on every push, so each commit kicks off your ML checks automatically.
on:
push:
branches: [main]Jobs Run the Work
A workflow holds one or more jobs. Each job runs on a fresh virtual machine, so your pipeline always starts from a clean, predictable state.
jobs:
build:
runs-on: ubuntu-latestSteps Are the Recipe
Inside a job, steps run in order from top to bottom. Each step is either a reusable action or a plain shell command you write.
Check Out Your Code
The first step almost always uses the checkout action to copy your repo onto the runner. Without it, the machine has no code to test.
- uses: actions/checkout@v4Set Up Python
For an ML repo you set up Python next, choosing the exact version so the runner matches the environment your team trains in.
- uses: actions/setup-python@v5
with:
python-version: "3.11"Install Dependencies
Then you install your pinned packages so the runner has the same libraries you use locally. This makes every CI run reproducible.
- run: pip install -r requirements.txtLint, Then Test
Now add the ML checks: a lint step to catch style issues, then pytest to run your data and model tests on the fresh runner.
- run: ruff check .
- run: pytestTrain on a Sample
A final step can train on a small sample to prove the pipeline works end to end, keeping CI fast while still exercising real code.
- run: python train.py --sample 1000Watch It Run
Push your YAML and open the Actions tab. GitHub shows a live log of each step, with a green check when your ML pipeline passes. ✅
Quick Check
Where must a GitHub Actions workflow file live to be picked up?
Recap
A workflow YAML in .github/workflows defines triggers, jobs, and ordered steps. For ML you check out code, set up Python, install deps, then lint, test, and train.
الأسئلة الشائعة
هل درس «سير عمل GitHub Actions لتعلّم الآلة» مجاني؟
نعم — نص درس «سير عمل GitHub Actions لتعلّم الآلة» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة MLOps Academy، انتقل إلى CoddyKit PRO. تتضمن دورة MLOps Academy 4 دروس في المجموع.
ماذا ستتعلم في «سير عمل GitHub Actions لتعلّم الآلة»؟
شغّل lint والاختبارات والتدريب مع كل عملية دفع. تتمرن على MLOps Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ MLOps Academy؟
لا تُشترط خبرة سابقة. MLOps Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 2 من أصل 4.
كم من الوقت يستغرق درس «سير عمل GitHub Actions لتعلّم الآلة»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس MLOps Academy هذا؟
نعم. كل درس في MLOps Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- ماذا تعني CI/CD للنماذج
- سير عمل GitHub Actions لتعلّم الآلة
- اشتراط جودة النموذج لدمج التغييرات
- بناء الصورة ودفعها عند الإصدار