Debian Codegraph @

.github/workflows/default.yml

raw symbols SCIP
1 # Workflow lints, and checks format in parallel then runs tests on all platforms
2
3 name: Default CI/CD
4
5 on:
6 push:
7 branches: [master]
8 pull_request:
9 branches: [master]
10
11 jobs:
12 lint:
13 runs-on: ubuntu-latest
14 steps:
15 - uses: actions/checkout@v4
16 - name: Set up Python 3.x
17 uses: actions/setup-python@v5
18 with:
19 python-version: 3.x
20 - name: Install dependencies
21 run: |
22 python -m pip install --upgrade pip
23 pip install flake8
24 - name: Lint with flake8
25 run: |
26 flake8 .
27 test:
28 needs: lint
29 runs-on: ${{ matrix.os }}
30 strategy:
31 matrix:
32 include:
33 - os: ubuntu-latest
34 python-version: 3.12
35 - os: ubuntu-latest
36 python-version: 3.11
37 - os: ubuntu-latest
38 python-version: "3.10"
39 - os: ubuntu-latest
40 python-version: 3.9
41 - os: ubuntu-latest
42 python-version: 3.8
43 - os: ubuntu-latest
44 python-version: 3.7
45 - os: ubuntu-latest
46 python-version: 2.7
47 # - os: macos-latest
48 # python-version: 3.11
49 # - os: macos-latestgit push
50 # python-version: 3.8
51 # - os: macos-latest
52 # python-version: 2.7
53 - os: windows-latest
54 python-version: 3.12
55 - os: windows-latest
56 python-version: 3.8
57 - os: windows-latest
58 python-version: 2.7
59
60 steps:
61 - uses: actions/checkout@v4
62 - name: Set up Python ${{ matrix.python-version }}
63 uses: LizardByte/setup-python-action@master
64 with:
65 python-version: ${{ matrix.python-version }}
66 - name: Install dependencies
67 run: |
68 python -m pip install --upgrade pip
69 pip install pytest
70 - name: Install windows dependencies
71 if: ${{ matrix.os == 'windows-latest' }}
72 run: |
73 pip install pywin32
74 - name: Install macOS dependencies
75 if: ${{ matrix.os == 'macos-latest' }}
76 run: |
77 pip install pyobjc-framework-Cocoa
78 - name: Run tests
79 run: |
80 pytest