Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
- develop
- "feat*"

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
run-workflow:
name: PR Workflow
Expand Down Expand Up @@ -264,7 +268,7 @@ jobs:
- run: pytest -vv tests/integration/workflows/python_pip

ruby-integration:
name: ${{ matrix.os }} / ${{ matrix.python }} / ruby-${{ matrix.ruby }}
name: ${{ matrix.os }} / ${{ matrix.python }} / ruby
if: github.repository_owner == 'aws'
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -278,17 +282,17 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
ruby:
- "3.1"
- "2.7"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
ruby-version: "3.2"
- uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7"
- run: make init
- run: pytest -vv tests/integration/workflows/ruby_bundler

Expand Down
1 change: 1 addition & 0 deletions aws_lambda_builders/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"python3.9": [ARM64, X86_64],
"python3.10": [ARM64, X86_64],
"ruby2.7": [ARM64, X86_64],
"ruby3.2": [ARM64, X86_64],
"java8": [ARM64, X86_64],
"java11": [ARM64, X86_64],
"java17": [ARM64, X86_64],
Expand Down
12 changes: 11 additions & 1 deletion tests/integration/workflows/ruby_bundler/test_ruby.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

from unittest import TestCase, mock

from parameterized import parameterized_class

from aws_lambda_builders.builder import LambdaBuilder
from aws_lambda_builders.exceptions import WorkflowFailedError

Expand All @@ -13,11 +15,20 @@
workflow_logger = logging.getLogger("aws_lambda_builders.workflows.ruby_bundler.workflow")


@parameterized_class(
("runtime",),
[
("ruby2.7",),
("ruby3.2",),
],
)
class TestRubyWorkflow(TestCase):
"""
Verifies that `ruby` workflow works by building a Lambda using Bundler
"""

runtime = ""

TEST_DATA_FOLDER = os.path.join(os.path.dirname(__file__), "testdata")

def setUp(self):
Expand All @@ -26,7 +37,6 @@ def setUp(self):
self.dependencies_dir = tempfile.mkdtemp()
self.no_deps = os.path.join(self.TEST_DATA_FOLDER, "no-deps")
self.builder = LambdaBuilder(language="ruby", dependency_manager="bundler", application_framework=None)
self.runtime = "ruby2.7"

def tearDown(self):
shutil.rmtree(self.artifacts_dir)
Expand Down