github.com/drone/go-convert@v0.0.0-20240307072510-6bd371c65e61/convert/github/testdata/build-and-test/python.yaml.golden (about) 1 kind: pipeline 2 spec: 3 stages: 4 - name: build 5 spec: 6 clone: {} 7 platform: 8 arch: amd64 9 os: linux 10 runtime: 11 spec: {} 12 type: cloud 13 steps: 14 - name: Set up Python ${{ matrix.python-version }} 15 spec: 16 uses: actions/setup-python@v4 17 with: 18 python-version: ${{ matrix.python-version }} 19 type: action 20 - name: Install dependencies 21 spec: 22 run: | 23 python -m pip install --upgrade pip 24 pip install ruff pytest 25 if [ -f requirements.txt ]; then pip install -r requirements.txt; fi 26 type: script 27 - name: Lint with ruff 28 spec: 29 run: | 30 # stop the build if there are Python syntax errors or undefined names 31 ruff --format=github --select=E9,F63,F7,F82 --target-version=py37 . 32 # default set of ruff rules with GitHub Annotations 33 ruff --format=github --target-version=py37 . 34 type: script 35 - name: Test with pytest 36 spec: 37 run: pytest 38 type: script 39 strategy: 40 spec: 41 axis: 42 python-version: 43 - "3.7" 44 - "3.8" 45 - "3.9" 46 - "3.10" 47 - "3.11" 48 type: matrix 49 type: ci 50 version: 1