-
Notifications
You must be signed in to change notification settings - Fork 1
103 lines (80 loc) · 2.7 KB
/
Copy pathpython.yml
File metadata and controls
103 lines (80 loc) · 2.7 KB
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
name: Python
on:
push:
branches:
- '**'
schedule:
- cron: '0 17 * * *'
jobs:
check_code_format:
name: Check code format
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event_name == 'schedule' && github.ref == 'refs/heads/main')
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/workflows/python-common
- name: Check code format
run: ./dev.py black-check
check_types:
name: Check types
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/workflows/python-common
- name: Check types
run: ./dev.py check-types
check_lint:
name: Check lint
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event_name == 'schedule' && github.ref == 'refs/heads/main')
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/workflows/python-common
- name: Check lint
run: ./dev.py lint
run_tests:
name: Run tests - Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event_name == 'schedule' && github.ref == 'refs/heads/main')
strategy:
fail-fast: false
matrix:
include:
- python-version: '3.10'
- python-version: '3.11'
- python-version: '3.12'
- python-version: '3.13'
- python-version: '3.14'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/workflows/python-common
with:
python-version: ${{ matrix.python-version }}
extras-param: '--extras client --extras lambda_common --extras compute_graph'
- name: Run tests
run: ./dev.py coverage
env:
AWS_DEFAULT_REGION: ${{ vars.OSS_AWS_DEFAULT_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.OSS_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.OSS_AWS_SECRET_ACCESS_KEY }}
INTEGRATION_TEST_BUCKET: ${{ vars.INTEGRATION_TEST_BUCKET }}
INTEGRATION_TEST_LAMBDA_ROLE: ${{ vars.INTEGRATION_TEST_LAMBDA_ROLE }}
build_and_upload:
name: Build and upload
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event_name == 'schedule' && github.ref == 'refs/heads/main')
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/workflows/python-common
- name: Build the package
run: poetry build
- name: Upload distributable
uses: actions/upload-artifact@v4
with:
name: dist-artifacts
path: dist/