-
Notifications
You must be signed in to change notification settings - Fork 492
Expand file tree
/
Copy pathquality_code_cdk_constructor.yml
More file actions
71 lines (65 loc) · 2 KB
/
Copy pathquality_code_cdk_constructor.yml
File metadata and controls
71 lines (65 loc) · 2 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
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/**"
branches:
- develop
push:
paths:
- "layer_v3/layer_constructors/**"
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: Install poetry
run: pipx install poetry
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Set up QEMU
uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.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@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
with:
driver: docker
platforms: linux/amd64,linux/arm64
- name: Install dependencies
run: |
pip install --upgrade pip pre-commit poetry
poetry install
- name: Test with pytest
run: poetry run pytest tests
env:
BUILDX_BUILDER: ${{ steps.builder.outputs.name }}