Skip to content

Commit cd79e90

Browse files
Merge branch 'develop'
2 parents 5611362 + d737065 commit cd79e90

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+4178
-101
lines changed

.github/dependabot.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version: 2
2+
updates:
3+
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
commit-message:
9+
prefix: chore
10+
include: scope
11+
reviewers:
12+
- aws/serverless-application-experience-sbt
13+
14+
- package-ecosystem: "pip"
15+
directory: "/requirements"
16+
schedule:
17+
interval: "weekly"
18+
target-branch: "develop"
19+
commit-message:
20+
prefix: chore
21+
include: scope
22+
reviewers:
23+
- aws/serverless-application-experience-sbt
24+
ignore:
25+
# The dependencies are intentionally pinned to certain
26+
# version ranges for specific Python versions
27+
- dependency-name: "flake8"
28+
- dependency-name: "isort"

.github/workflows/build.yml

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
- python-integration
2222
- ruby-integration
2323
- dotnet-integration
24+
- rust-cargo-lambda-integration
2425
steps:
2526
- name: report-failure
2627
if: |
@@ -33,7 +34,8 @@ jobs:
3334
needs.custom-make-integration.result != 'success' ||
3435
needs.python-integration.result != 'success' ||
3536
needs.ruby-integration.result != 'success' ||
36-
needs.dotnet-integration.result != 'success'
37+
needs.dotnet-integration.result != 'success' ||
38+
needs.rust-cargo-lambda-integration.result != 'success'
3739
run: exit 1
3840
- name: report-success
3941
run: exit 0
@@ -296,3 +298,57 @@ jobs:
296298
python-version: ${{ matrix.python }}
297299
- run: make init
298300
- run: pytest -vv tests/integration/workflows/dotnet_clipackage
301+
302+
rust-cargo-lambda-integration:
303+
name: ${{ matrix.os }} / ${{ matrix.python }} / rust-cargo-lambda
304+
if: github.repository_owner == 'aws'
305+
runs-on: ${{ matrix.os }}
306+
env:
307+
CARGO_LAMBDA_VERSION: 0.15.0
308+
defaults:
309+
run:
310+
shell: bash
311+
strategy:
312+
fail-fast: false
313+
matrix:
314+
os:
315+
- ubuntu-latest
316+
- windows-latest
317+
python:
318+
- "3.9"
319+
- "3.8"
320+
- "3.7"
321+
rust:
322+
- stable
323+
steps:
324+
- uses: actions/checkout@v3
325+
- uses: actions/setup-python@v4
326+
with:
327+
python-version: ${{ matrix.python }}
328+
329+
# Install and configure Rust
330+
- name: Install rustup
331+
run: |
332+
: install rustup if needed
333+
if ! command -v rustup &> /dev/null ; then
334+
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
335+
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
336+
fi
337+
if: ${{ matrix.os }} == 'ubuntu-latest'
338+
- name: rustup toolchain install ${{ matrix.rust }}
339+
run: rustup toolchain install ${{ matrix.rust }} --profile minimal --no-self-update
340+
- run: rustup default ${{ matrix.rust }}
341+
- run: |
342+
: disable incremental compilation
343+
echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV
344+
- run: |
345+
: enable colors in Cargo output
346+
echo CARGO_TERM_COLOR=always >> $GITHUB_ENV
347+
348+
# Install and configure Cargo Lambda
349+
- name: Install Cargo Lambda
350+
run: pip install cargo-lambda==$CARGO_LAMBDA_VERSION
351+
- run: echo "$HOME/.local/bin" >> $GITHUB_PATH
352+
353+
- run: make init
354+
- run: pytest -vv tests/integration/workflows/rust_cargo

.github/workflows/pr-labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
pull-requests: write
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/github-script@v5
20+
- uses: actions/github-script@v6
2121
with:
2222
github-token: ${{secrets.GITHUB_TOKEN}}
2323
script: |

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@ init:
22
LAMBDA_BUILDERS_DEV=1 pip install -e '.[dev]'
33

44
test:
5-
# Run unit tests
5+
# Run unit and functional tests
66
# Fail if coverage falls below 94%
77
LAMBDA_BUILDERS_DEV=1 pytest -vv --cov aws_lambda_builders --cov-report term-missing --cov-fail-under 94 tests/unit tests/functional
88

9+
unit-test:
10+
LAMBDA_BUILDERS_DEV=1 pytest tests/unit
11+
912
func-test:
1013
LAMBDA_BUILDERS_DEV=1 pytest tests/functional
1114

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Lambda Builders currently contains the following workflows
1818
* Typescript with esbuild
1919
* Ruby with Bundler
2020
* Go with Mod
21+
* Rust with Cargo
2122

2223
In Addition to above workflows, AWS Lambda Builders also supports *Custom Workflows* through a Makefile.
2324

aws_lambda_builders/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
# Changing version will trigger a new release!
66
# Please make the version change as the last step of your development.
7-
__version__ = "1.26.0"
7+
__version__ = "1.27.0"
88
RPC_PROTOCOL_VERSION = "0.3"

aws_lambda_builders/__main__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
Read the design document for explanation of the JSON-RPC interface
77
"""
88

9-
import sys
109
import json
11-
import os
1210
import logging
11+
import os
1312
import re
13+
import sys
1414

15+
from aws_lambda_builders import RPC_PROTOCOL_VERSION as lambda_builders_protocol_version
1516
from aws_lambda_builders.architecture import X86_64
1617
from aws_lambda_builders.builder import LambdaBuilder
17-
from aws_lambda_builders.exceptions import WorkflowNotFoundError, WorkflowUnknownError, WorkflowFailedError
18-
from aws_lambda_builders import RPC_PROTOCOL_VERSION as lambda_builders_protocol_version
18+
from aws_lambda_builders.exceptions import WorkflowFailedError, WorkflowNotFoundError, WorkflowUnknownError
1919

2020
log_level = int(os.environ.get("LAMBDA_BUILDERS_LOG_LEVEL", logging.INFO))
2121

aws_lambda_builders/actions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import os
77
import shutil
88
from pathlib import Path
9-
from typing import Set, Iterator, Tuple
9+
from typing import Iterator, Set, Tuple
1010

1111
from aws_lambda_builders import utils
1212
from aws_lambda_builders.utils import copytree

aws_lambda_builders/builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"""
44

55
import importlib
6-
import os
76
import logging
7+
import os
88

99
from aws_lambda_builders.architecture import X86_64
10-
from aws_lambda_builders.registry import get_workflow, DEFAULT_REGISTRY
10+
from aws_lambda_builders.registry import DEFAULT_REGISTRY, get_workflow
1111
from aws_lambda_builders.workflow import Capability
1212

1313
LOG = logging.getLogger(__name__)

aws_lambda_builders/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
Common utilities for the library
33
"""
44

5+
import logging
6+
import os
57
import shutil
68
import sys
7-
import os
8-
import logging
99
from pathlib import Path
1010
from typing import Union
1111

0 commit comments

Comments
 (0)