Skip to content

Commit b1127c1

Browse files
committed
fix(ci): Install dependencies and run only unit tests in workflow
- Add dependency installation step with uv sync --all-extras --dev - Change test command to run only unit tests (tests/unit) instead of all tests - Add AWS_DEFAULT_REGION environment variable for boto3 client initialization - Fix Python version label in build workflow (3.12 -> 3.13)
1 parent 58bf0c3 commit b1127c1

File tree

5 files changed

+20
-2
lines changed

5 files changed

+20
-2
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Checkout code
3333
uses: actions/checkout@v4
3434

35-
- name: Set up Python 3.12
35+
- name: Set up Python 3.13
3636
uses: actions/setup-python@v4
3737
with:
3838
python-version: 3.13

.github/workflows/reusable_unit_tests.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ jobs:
2222
with:
2323
version: 0.7.8
2424

25+
- name: Install dependencies
26+
run: uv sync --all-extras --dev
27+
working-directory: ./${{ inputs.service_directory }}
28+
2529
- name: Run Unit tests
26-
run: make test
30+
run: make unit-test
2731
working-directory: ./${{ inputs.service_directory }}
32+
env:
33+
AWS_DEFAULT_REGION: us-east-1

unicorn_approvals/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ test: ## Run tests
9999
@echo "Running tests..."
100100
@uv run pytest
101101

102+
unit-test: ## Run unit tests only
103+
@echo "Running unit tests..."
104+
@uv run pytest tests/unit -v
105+
102106
lint: ## Lint Python code and CloudFormation templates
103107
@echo "Linting Python code..."
104108
@uv run ruff check .

unicorn_contracts/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ test: ## Run tests
6161
@echo "Running tests..."
6262
@uv run pytest
6363

64+
unit-test: ## Run unit tests only
65+
@echo "Running unit tests..."
66+
@uv run pytest tests/unit -v
67+
6468
lint: ## Lint Python code and CloudFormation templates
6569
@echo "Linting Python code..."
6670
@uv run ruff check .

unicorn_web/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ test: ## Run tests
7272
@echo "Running tests..."
7373
@uv run pytest
7474

75+
unit-test: ## Run unit tests only
76+
@echo "Running unit tests..."
77+
@uv run pytest tests/unit -v
78+
7579
lint: ## Lint Python code and CloudFormation templates
7680
@echo "Linting Python code..."
7781
@uv run ruff check .

0 commit comments

Comments
 (0)