-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (63 loc) · 1.87 KB
/
code_quality_tests_ubuntu_masos.yml
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
name: Code checks & tests (Ubuntu & macOS)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: "0 12 * * 1" # every Monday at 12:00 UTC
workflow_dispatch:
jobs:
code_quality_ubuntu_macos:
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest']
python-version: ['3.9', '3.12']
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- name: Check out code repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install package with latest version of all dependencies
run: |
poetry update --no-interaction --sync
poetry install --no-interaction --all-extras
- name: Run Black check
run: |
source $VENV
black . --check
- name: Lint with ruff
run: |
source $VENV
ruff check .
- name: Check types with mypy
run: |
source $VENV
mypy . --strict
if: ${{ matrix.python-version == '3.9' }}
- name: Check types with mypy
run: |
source $VENV
mypy . --ignore-missing-imports
if: ${{ matrix.python-version == '3.12' }}
- name: Run tests
env:
DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }}
DATABRICKS_HTTP_PATH: ${{ secrets.DATABRICKS_HTTP_PATH }}
DATABRICKS_CLIENT_ID: ${{ secrets.DATABRICKS_CLIENT_ID }}
DATABRICKS_CLIENT_SECRET: ${{ secrets.DATABRICKS_CLIENT_SECRET }}
run: |
source $VENV
pytest -v