-
Notifications
You must be signed in to change notification settings - Fork 504
Expand file tree
/
Copy pathquality_code_cdk_constructor.yml
More file actions
77 lines (71 loc) · 2.29 KB
/
Copy pathquality_code_cdk_constructor.yml
File metadata and controls
77 lines (71 loc) · 2.29 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
name: Code quality - CDK constructor
# PROCESS
#
# 1. Install all dependencies and spin off containers for all supported Python versions
# 2. Run code formatters and linters (various checks) for code standard
# 3. Run static typing checker for potential bugs
# 4. Run tests
# USAGE
#
# Always triggered on new PRs, PR changes and PR merge.
on:
pull_request:
paths:
- "layer_v3/layer_constructors/**"
- "layer_v3/pyproject.toml"
- "layer_v3/uv.lock"
- ".github/workflows/quality_code_cdk_constructor.yml"
branches:
- develop
push:
paths:
- "layer_v3/layer_constructors/**"
- "layer_v3/pyproject.toml"
- "layer_v3/uv.lock"
- ".github/workflows/quality_code_cdk_constructor.yml"
branches:
- develop
permissions:
contents: read
jobs:
quality_check_cdk:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ["3.14"]
env:
PYTHON: "${{ matrix.python-version }}"
permissions:
contents: read # checkout code only
defaults:
run:
working-directory: ./layer_v3/layer_constructors
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up uv
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
version: "0.12.19"
enable-cache: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Set up QEMU
uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
with:
platforms: arm64
# NOTE: we need QEMU to build Layer against a different architecture (e.g., ARM)
- name: Set up Docker Buildx
id: builder
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1
with:
driver: docker
platforms: linux/amd64,linux/arm64
- name: Install dependencies
run: uv sync --locked --no-build
- name: Test with pytest
run: uv run --locked --no-build pytest tests
env:
BUILDX_BUILDER: ${{ steps.builder.outputs.name }}