Debian Codegraph @

ci/github/workflows/python-package-mac.yml

raw
1 # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2 # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
4 name: Python package Mac
5
6 on:
7 push:
8 pull_request:
9
10 jobs:
11 build:
12 runs-on: macos-latest
13 strategy:
14 matrix:
15 python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
16 xcode-version: [latest-stable]
17
18 steps:
19 - uses: actions/checkout@v3
20 - name: Configure xcode ${{ matrix.xcode-version }}
21 uses: maxim-lobanov/setup-xcode@v1
22 with:
23 xcode-version: ${{ matrix.xcode-version }}
24 - name: Set up Python ${{ matrix.python-version }}
25 uses: actions/setup-python@v3
26 with:
27 python-version: ${{ matrix.python-version }}
28 - name: Install dependencies
29 run: |
30 python -m pip install --upgrade pip
31 pip install flake8
32 if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
33 if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
34 - name: Lint with flake8
35 run: |
36 # stop the build if there are Python syntax errors or undefined names
37 flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
38 # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
39 flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
40 - name: Build and install with pip
41 run: |
42 pip install .
43 - name: Test of run_tests.py
44 run: |
45 python run_tests.py
46 - name: Run end to end tests with e2etest.py
47 run: |
48 mkdir empty
49 cd empty
50 pip install -r ../e2etest/requirements_e2e.txt
51 python ../e2etest/e2etest.py