github.com/drone/go-convert@v0.0.0-20240307072510-6bd371c65e61/convert/github/testdata/examples/python.yaml (about)

     1  name: Python package
     2  
     3  jobs:
     4    build:
     5  
     6      runs-on: ubuntu-latest
     7      strategy:
     8        fail-fast: false
     9        matrix:
    10          python-version: ["3.8", "3.9", "3.10"]
    11  
    12      steps:
    13        - uses: actions/checkout@v3
    14        - name: Set up Python ${{ matrix.python-version }}
    15          uses: actions/setup-python@v3
    16          with:
    17            python-version: ${{ matrix.python-version }}
    18        - name: Install dependencies
    19          run: |
    20            python -m pip install --upgrade pip
    21            python -m pip install flake8 pytest
    22            if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
    23        - name: Lint with flake8
    24          run: |
    25            # stop the build if there are Python syntax errors or undefined names
    26            flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
    27            # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
    28            flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
    29        - name: Test with pytest
    30          run: |
    31            pytest