|
1 | 1 | name: ci |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - branches: |
6 | | - - "master" |
7 | | - pull_request: |
8 | | - paths-ignore: |
9 | | - - '**.md' |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - "master" |
| 7 | + pull_request: |
| 8 | + paths-ignore: |
| 9 | + - "**.md" |
10 | 10 |
|
11 | 11 | # Cancel previous PR builds. |
12 | 12 | concurrency: |
13 | | - # Cancel all workflow runs except latest within a concurrency group. This is achieved by defining a concurrency group for the PR. |
14 | | - # Non-PR builds have singleton concurrency groups. |
15 | | - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.number || github.sha }} |
16 | | - cancel-in-progress: true |
| 13 | + # Cancel all workflow runs except latest within a concurrency group. This is achieved by defining a concurrency group for the PR. |
| 14 | + # Non-PR builds have singleton concurrency groups. |
| 15 | + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.number || github.sha }} |
| 16 | + cancel-in-progress: true |
17 | 17 |
|
18 | 18 | jobs: |
19 | | - checks: |
20 | | - runs-on: ubuntu-latest |
21 | | - steps: |
22 | | - - name: "Checkout the source code" |
23 | | - uses: actions/checkout@v3 |
| 19 | + checks: |
| 20 | + runs-on: ubuntu-latest |
| 21 | + steps: |
| 22 | + - name: "Checkout the source code" |
| 23 | + uses: actions/checkout@v3 |
24 | 24 |
|
25 | | - - name: "Install Python" |
26 | | - uses: actions/setup-python@v4 |
27 | | - with: |
28 | | - python-version: "3.11" |
| 25 | + - name: "Install Python" |
| 26 | + uses: actions/setup-python@v4 |
| 27 | + with: |
| 28 | + python-version: "3.11" |
29 | 29 |
|
30 | | - - name: "Install pre-commit" |
31 | | - run: pip install pre-commit |
| 30 | + - name: "Install pre-commit" |
| 31 | + run: pip install pre-commit |
32 | 32 |
|
33 | | - - name: "Run pre-commit checks" |
34 | | - run: pre-commit run --hook-stage manual --all-files |
| 33 | + - name: "Run pre-commit checks" |
| 34 | + run: pre-commit run --hook-stage manual --all-files |
35 | 35 |
|
36 | | - build: |
37 | | - runs-on: ubuntu-latest |
38 | | - strategy: |
39 | | - fail-fast: false |
40 | | - matrix: |
41 | | - python: [ |
42 | | - "3.7", |
43 | | - "3.8", |
44 | | - "3.9", |
45 | | - "3.10", |
46 | | - "3.11", |
47 | | - "pypy-3.8", |
48 | | - "pypy-3.9", |
49 | | - ] |
50 | | - trino: [ |
51 | | - "latest", |
52 | | - ] |
53 | | - sqlalchemy: [ |
54 | | - "~=1.4.0" |
55 | | - ] |
56 | | - include: |
57 | | - # Test with older Trino versions for backward compatibility |
58 | | - - { python: "3.11", trino: "351", sqlalchemy: "~=1.4.0" } # first Trino version |
59 | | - # Test with sqlalchemy 1.3 |
60 | | - - { python: "3.11", trino: "latest", sqlalchemy: "~=1.3.0" } |
61 | | - env: |
62 | | - TRINO_VERSION: "${{ matrix.trino }}" |
63 | | - steps: |
64 | | - - uses: actions/checkout@v3 |
65 | | - - uses: actions/setup-python@v4 |
66 | | - with: |
67 | | - python-version: ${{ matrix.python }} |
68 | | - - name: Install dependencies |
69 | | - run: | |
70 | | - sudo apt-get update |
71 | | - sudo apt-get install libkrb5-dev |
72 | | - pip install .[tests] sqlalchemy${{ matrix.sqlalchemy }} |
73 | | - - name: Run tests |
74 | | - run: | |
75 | | - pytest -s tests/ |
| 36 | + build: |
| 37 | + runs-on: ubuntu-latest |
| 38 | + strategy: |
| 39 | + fail-fast: false |
| 40 | + matrix: |
| 41 | + python: |
| 42 | + [ |
| 43 | + "3.7", |
| 44 | + "3.8", |
| 45 | + "3.9", |
| 46 | + "3.10", |
| 47 | + "3.11", |
| 48 | + "pypy-3.8", |
| 49 | + "pypy-3.9", |
| 50 | + ] |
| 51 | + trino: ["latest"] |
| 52 | + sqlalchemy: ["~=1.4.0"] |
| 53 | + include: |
| 54 | + # Test with older Trino versions for backward compatibility |
| 55 | + - { python: "3.11", trino: "351", sqlalchemy: "~=1.4.0" } # first Trino version |
| 56 | + # Test with sqlalchemy 1.3 |
| 57 | + - { python: "3.11", trino: "latest", sqlalchemy: "~=1.3.0" } |
| 58 | + # Test with sqlalchemy 2.0 |
| 59 | + - { |
| 60 | + python: "3.11", |
| 61 | + trino: "latest", |
| 62 | + sqlalchemy: "~=2.0.0b4", |
| 63 | + } |
| 64 | + env: |
| 65 | + TRINO_VERSION: "${{ matrix.trino }}" |
| 66 | + steps: |
| 67 | + - uses: actions/checkout@v3 |
| 68 | + - uses: actions/setup-python@v4 |
| 69 | + with: |
| 70 | + python-version: ${{ matrix.python }} |
| 71 | + - name: Install dependencies |
| 72 | + run: | |
| 73 | + sudo apt-get update |
| 74 | + sudo apt-get install libkrb5-dev |
| 75 | + pip install .[tests] sqlalchemy${{ matrix.sqlalchemy }} |
| 76 | + - name: Run tests |
| 77 | + run: | |
| 78 | + pytest -s tests/ |
0 commit comments