-
Notifications
You must be signed in to change notification settings - Fork 2
105 lines (95 loc) · 2.7 KB
/
python.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Python CI
on:
push:
branches:
- '*'
pull_request:
types: ['opened', 'reopened', 'synchronize']
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest" ]
python-version: [ "3.10" ]
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Set up Python environment
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: flake8 Lint
uses: py-actions/flake8@v2
with:
path: "xorbits_sql"
args: "--config setup.cfg"
- name: black
uses: psf/black@stable
with:
src: "xorbits_sql"
options: "--check"
- uses: isort/isort-action@master
with:
sortPaths: "xorbits_sql"
configuration: "--check-only --diff --sp setup.cfg"
- name: mypy
run: pip install mypy && mypy xorbits_sql
- name: codespell
run: pip install codespell && codespell xorbits_sql
build_test_job:
runs-on: ${{ matrix.os }}
needs: lint
env:
CONDA_ENV: xorbits_sql-test
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
module: ["xorbits_sql"]
exclude:
- { os: macos-latest, python-version: 3.9 }
- { os: macos-latest, python-version: 3.10 }
- { os: windows-latest, python-version: 3.9 }
- { os: windows-latest, python-version: 3.10 }
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Set up conda ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
activate-environment: ${{ env.CONDA_ENV }}
- name: Install dependencies
env:
MODULE: ${{ matrix.module }}
run: |
pip install cython coverage flaky
pip install -e ".[dev]"
working-directory: .
- name: Test with pytest
env:
MODULE: ${{ matrix.module }}
run: |
pytest --cov-config=setup.cfg --cov-report=xml --cov=xorbits_sql --durations=0 \
--log-level=DEBUG --timeout=200 xorbits_sql
working-directory: .
- name: Report coverage data
uses: codecov/codecov-action@v3
with:
working-directory: .
flags: unittests