name: Python Test

on:
  push:
    branches: [ main ]
  pull_request:

jobs:
  test:
    name: Test Python
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Setup Python
        uses: actions/setup-python@v4
        with:
          python-version: '3.9'

      - name: Check Python version
        run: python3 --version

      - name: Create simple script
        run: |
          echo 'print("Hello from Python!")' > test.py
          echo 'import sys; print(f"Python version: {sys.version}")' >> test.py

      - name: Run Python script
        run: python3 test.py 