CI/CD pour le Machine Learning
Ravi Bhadauria
Machine Learning Engineer
main



Enregistrez sous hello_world.py dans la branche
import datetime
def main():
print("Hello, World!")
# Get the current time and print it
current_time = datetime.datetime.now()
print("Current time:", current_time)
if __name__ == "__main__":
main()
on:
pull_request:
branches: [ "main" ]
steps:
- name: My Action
uses: <org_or_user_name>/<reponame>@<version_number>
with:
action-argument: value
Dépôt de l'action https://github.com/<org_or_user_name>/<reponame>
Les arguments sont fournis avec la clé with
Actions du Marketplace GitHub : https://github.com/actions
steps:
- name: Checkout
uses: actions/checkout@v3
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
mainbuild contient trois étapesCheckout extrait le dépôtSetup Python configure l'environnement PythonRun Python script exécute le fichier Pythonname: PR
on:
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Run Python script
run: |
echo hello_world.py
python hello_world.py


CI/CD pour le Machine Learning