24 lines
581 B
YAML
24 lines
581 B
YAML
name: Python Test
|
|
on: [push]
|
|
|
|
jobs:
|
|
python-hello:
|
|
runs-on: [ubuntu-latest]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Python 3 if missing
|
|
run: |
|
|
if ! command -v python3 >/dev/null; then
|
|
sudo apt-get update
|
|
sudo apt-get install -y python3 python3-venv python3-pip
|
|
fi
|
|
|
|
- name: Verify Python installation
|
|
run: python3 --version
|
|
|
|
- name: Run “Hello, Python!”
|
|
run: |
|
|
echo 'print("Hello, Python!")' > main.py
|
|
python3 main.py |