Skip to content

Commit

Permalink
chore: Rebase config project to develop (#5406)
Browse files Browse the repository at this point in the history
* fix: fix the hardcoded number of stages printed in logs. (#5210)

* feat: Linking Authorizers to Lambda functions using the invocation URI (#5196)

* Link authorizer to lambda function invoke URI

* Updated doc string

* Updated exception messages back

* Added check for one element in reference list

* Updated empty ref list check to not block

* Updated log message

* Fix long line lint error

---------

Co-authored-by: Mohamed Elasmar <[email protected]>

* chore(deps-dev): bump parameterized from 0.8.1 to 0.9.0 in /requirements (#5214)

Bumps [parameterized](https://github.com/wolever/parameterized) from 0.8.1 to 0.9.0.
- [Changelog](https://github.com/wolever/parameterized/blob/master/CHANGELOG.txt)
- [Commits](wolever/parameterized@v0.8.1...v0.9.0)

---
updated-dependencies:
- dependency-name: parameterized
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump filelock from 3.10.7 to 3.12.0 in /requirements (#5213)

Bumps [filelock](https://github.com/tox-dev/py-filelock) from 3.10.7 to 3.12.0.
- [Release notes](https://github.com/tox-dev/py-filelock/releases)
- [Changelog](https://github.com/tox-dev/py-filelock/blob/main/docs/changelog.rst)
- [Commits](tox-dev/filelock@3.10.7...3.12.0)

---
updated-dependencies:
- dependency-name: filelock
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump attrs from 22.2.0 to 23.1.0 in /requirements (#5212)

Bumps [attrs](https://github.com/python-attrs/attrs) from 22.2.0 to 23.1.0.
- [Release notes](https://github.com/python-attrs/attrs/releases)
- [Changelog](https://github.com/python-attrs/attrs/blob/main/CHANGELOG.md)
- [Commits](python-attrs/attrs@22.2.0...23.1.0)

---
updated-dependencies:
- dependency-name: attrs
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: update SAM CLI with latest App Templates commit hash (#5211)

* feat: updating app templates repo hash with (a34f563f067e13df3eb350d36461b99397b6cda6)

* dummy change to trigger checks

* revert dummy commit

---------

Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Mohamed Elasmar <[email protected]>

* fix: fix failing Terraform integration test cases (#5218)

* fix: fix the failing terraform integration test cases

* fix: fix the resource address while accessing the module config resources

* fix: fix checking the experimental log integration test cases

* chore: bump version to 1.85.0 (#5226)

* chore: use the SAR Application created in testing accounts (#5221)

* chore: update aws_lambda_builders to 1.32.0 (#5215)

Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Mohamed Elasmar <[email protected]>

* feat: Added linking Gateway Method to Lambda Authorizer (#5228)

* Added linking method to authorizer

* Fixed docstring spelling mistake

---------

Co-authored-by: Mohamed Elasmar <[email protected]>

* feat: Return early during linking if no destination resources are found (#5220)

* Returns during linking if no destination resources are found

* Updated comment to correctly reflect state

* Cleaned extra word

---------

Co-authored-by: Mohamed Elasmar <[email protected]>

* chore: Strengthen wording on "no Auth" during deploy (#5231)

Co-authored-by: Jacob Fuss <[email protected]>
Co-authored-by: Sriram Madapusi Vasudevan <[email protected]>

* feat: Link Lambda Authorizer to Rest API (#5219)

* Link RestApiId property for Lambda Authorizers

* Updated docstring

* Format files

---------

Co-authored-by: Mohamed Elasmar <[email protected]>

* feat: updating app templates repo hash with (9ee7db342025a42023882960b23ebfcde1d87422) (#5242)

Co-authored-by: GitHub Action <[email protected]>

* fix: handle edge cases with function sync flow in sam sync command (#5222)

* fix: handle special cases for function sync flow

* update with unit tests

* add integration tests

* set ADL to false

* fix update file methods

* address comments

* address comments to instantiate FunctionBuildInfo in the beginning

* chore: Upgrade Mac installer to Py3.11 (#5223)

* chore: Upgrade Mac installer to Py3.11

* Remove python in mac installer build process

* Update hardcoded python version in build-mac.sh

---------

Co-authored-by: Jacob Fuss <[email protected]>

* feat: updating app templates repo hash with (66f4a230d1c939a0c3f7b5647710c694c3a486f7) (#5245)

Co-authored-by: GitHub Action <[email protected]>

* Revert "chore: Upgrade Mac installer to Py3.11 (#5223)" (#5252)

This reverts commit 5954042.

* fix: add 3.11 to classifiers and upgrade Docker (#5225)

* fix: add 3.11 to classifiers

- update dependencies, need to nail down the versions.

* Pin dev dependencies and handle excluding folders for mypy

* Remove unneeded type: ignores

* Fix name-match mypy errors

* Fix empty-body error from mypy

* Fix mypy errors by ignoring and get pytest to run/pass

* Force mypy to not fail hopefully

* Remove unneeded assignment

* Update pinned requirements file

---------

Co-authored-by: Jacob Fuss <[email protected]>
Co-authored-by: Jacob Fuss <[email protected]>

* fix: fix build and deploy SAR integration test cases (#5244)

* fix: fix build SAR integration test cases

* add comments to the UpdatableSARTemplate class usage.

* fix black check

* chore(deps): bump markupsafe from 2.1.2 to 2.1.3 in /requirements (#5257)

Bumps [markupsafe](https://github.com/pallets/markupsafe) from 2.1.2 to 2.1.3.
- [Release notes](https://github.com/pallets/markupsafe/releases)
- [Changelog](https://github.com/pallets/markupsafe/blob/main/CHANGES.rst)
- [Commits](pallets/markupsafe@2.1.2...2.1.3)

---
updated-dependencies:
- dependency-name: markupsafe
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump pydantic from 1.10.7 to 1.10.8 in /requirements (#5258)

Bumps [pydantic](https://github.com/pydantic/pydantic) from 1.10.7 to 1.10.8.
- [Release notes](https://github.com/pydantic/pydantic/releases)
- [Changelog](https://github.com/pydantic/pydantic/blob/v1.10.8/HISTORY.md)
- [Commits](pydantic/pydantic@v1.10.7...v1.10.8)

---
updated-dependencies:
- dependency-name: pydantic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: Add click command for cloud invoke command (#5238)

* Add custom click option for cloud invoke called parameter

* Added more error handling to executors and updated output-format enum to use auto

* Add new CLI command for cloud invoke

* Update samcli/commands/remote_invoke/invoke/cli.py

Co-authored-by: Mehmet Nuri Deveci <[email protected]>

* Update samcli/commands/remote_invoke/invoke/cli.py

Co-authored-by: Mehmet Nuri Deveci <[email protected]>

* Update samcli/commands/remote_invoke/cloud.py

Co-authored-by: Mehmet Nuri Deveci <[email protected]>

* Update samcli/cli/types.py

Co-authored-by: Mehmet Nuri Deveci <[email protected]>

* Address feedback

* Moved all command options to be handled by click configuration

* Updated validation function doc-string

* Updated debug logs in types.py

* Changed remote_invoke dir to cloud and updated log level for validation

* Address feedback

---------

Co-authored-by: Mehmet Nuri Deveci <[email protected]>

* chore(deps-dev): bump boto3-stubs[apigateway,cloudformation,ecr,iam,lambda,s3,schemas,secretsmanager,signer,stepfunctions,sts,xray] (#5256)

Bumps [boto3-stubs[apigateway,cloudformation,ecr,iam,lambda,s3,schemas,secretsmanager,signer,stepfunctions,sts,xray]](https://github.com/youtype/mypy_boto3_builder) from 1.26.131 to 1.26.146.
- [Release notes](https://github.com/youtype/mypy_boto3_builder/releases)
- [Commits](https://github.com/youtype/mypy_boto3_builder/commits)

---
updated-dependencies:
- dependency-name: boto3-stubs[apigateway,cloudformation,ecr,iam,lambda,s3,schemas,secretsmanager,signer,stepfunctions,sts,xray]
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* pin pytest-metadata to avoid its breaking change (#5261)

* chore: update aws_lambda_builders to 1.33.0 (#5262)

Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Daniel Mil <[email protected]>

* chore: Add python3.11 to canaries (#5263)

* chore: Add python3.11 to canaries

* Remove python3.9

* Artifact export for GraphQLApi (#5250)

* Artifact export for GraphQLApi

* format

* docstrings

* fix unit tests

* fix mypy issues

* improve search method signature

* chore: bump version to 1.86.0 (#5266)

* fix: add constant str for enums to support deepcopy operation (#5265)

* fix: add constant str for enums to support deepcopy operation

* add unit tests

* formatting

* update automated updates gha to force restart of status checks (#5269)

* integration tests for graphql resource package (#5271)

* Revert "fix: add 3.11 to classifiers and upgrade Docker (#5225)"

This reverts commit b51d661.

* chore: bump version to 1.86.1

* chore: Upgrade Docker-py/ Support Py3.11 for running tests (#5279)

* fix: add 3.11 to classifiers and upgrade Docker (#5225)

* fix: add 3.11 to classifiers

- update dependencies, need to nail down the versions.

* Pin dev dependencies and handle excluding folders for mypy

* Remove unneeded type: ignores

* Fix name-match mypy errors

* Fix empty-body error from mypy

* Fix mypy errors by ignoring and get pytest to run/pass

* Force mypy to not fail hopefully

* Remove unneeded assignment

* Update pinned requirements file

---------

Co-authored-by: Jacob Fuss <[email protected]>
Co-authored-by: Jacob Fuss <[email protected]>

* chore: Force version on docker and allow unit test to run when docker not running

In order for the docker.from_env() not to fail when docker is not installed/running,
we force the min version on client creation. This was the default behavior in 4.X of
docker-py but not longer in the latest version.

---------

Co-authored-by: Sriram Madapusi Vasudevan <[email protected]>
Co-authored-by: Jacob Fuss <[email protected]>

* test: GHA to Execute Test without Docker Running (#5290)

* test: Test without Docker running

* Add build test

* Run install

* Remove success condition

* Add continue on error

* Add continue on error

* Separate tests

* Fix test name

* Require new test

* Address comments

* Attempt to parameterize for windows

* Attempt to parameterize for windows

* Attempt to parameterize for windows

* Set samdev in environment

* Move skip to top of test class

* fix: remove ruby3.2 from preview runtimes (#5296)

* fix: remove ruby3.2 from preview runtimes

* update {} with set()

* Fix: Force docker version to match 4.2's default version (#5305)

Co-authored-by: Jacob Fuss <[email protected]>

* chore: cleanup appveyor definitions for not running jobs which is already run with GHA & add docker info/version commands (#5306)

* chore: remove redundant tests and setup from appveyor definitions

* add/update docker info and docker version commands

* add 3.11 and macos to GHAs

* add some explanations to Windows section

* fix: Fix failing tests on Python3.11 (#5317)

* chore(deps): bump cryptography from 39.0.2 to 41.0.0 in /requirements (#5251)

* chore(deps): bump cryptography from 39.0.2 to 41.0.0 in /requirements

Bumps [cryptography](https://github.com/pyca/cryptography) from 39.0.2 to 41.0.0.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](pyca/cryptography@39.0.2...41.0.0)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump pyopenssl version to support newer cryptography lib

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lucas <[email protected]>
Co-authored-by: Jacob Fuss <[email protected]>
Co-authored-by: Mehmet Nuri Deveci <[email protected]>

* add sleep between close and reopen (#5320)

* GraphQLApi support for `sam deploy` (#5294)

* GraphQLApi support for `sam deploy`

* unit tests and format fixes

* fix: Update Arn parsing logic and fix some edge cases/bug fixes for remote invoke (#5295)

* Fix some edge cases and bug fixes for remote invoke and update Arn parsing logic

* Address feedback

* Add unit test for s3 with no region/accoint_id provided

* Renamed command to sam remote invoke

* chore: update aws_lambda_builders to 1.34.0 (#5343)

* chore: update aws_lambda_builders to 1.34.0

* Update base.txt

---------

Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Mohamed Elasmar <[email protected]>

* test: test building npm and Typescript projects using external manifest file. (#5283)

* test: test building npm and Typescript projects using external manifest file.

* fix mypy issues

* remove node 12.x, and add the new node versions

* run make format

* chore(deps-dev): bump ruff from 0.0.261 to 0.0.272 in /requirements (#5337)

Bumps [ruff](https://github.com/charliermarsh/ruff) from 0.0.261 to 0.0.272.
- [Release notes](https://github.com/charliermarsh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md)
- [Commits](astral-sh/ruff@v0.0.261...v0.0.272)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump pytest-cov from 4.0.0 to 4.1.0 in /requirements (#5335)

Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 4.0.0 to 4.1.0.
- [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst)
- [Commits](pytest-dev/pytest-cov@v4.0.0...v4.1.0)

---
updated-dependencies:
- dependency-name: pytest-cov
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: add lambda streaming support for remote invoke (#5307)

* feat: support response streaming with remote invoke

* add invoker and mappers

* Update output formatting of stream response

* add unit tests

* fix formatting

* Add docs

* address comments

* formatting

* move is_function_invoke_mode_response_stream into lambda invoke executors and add/update string constants

* chore: bump version to 1.87.0

* Revert app templates gha (#5356)

* Revert "add sleep between close and reopen (#5320)"

This reverts commit 5be690c.

* Revert "update automated updates gha to force restart of status checks (#5269)"

This reverts commit deb212b.

* refactor: make remote invoke reactive to display results as soon as they are available (#5359)

* refactor: make remote invoke reactive to display results as soon as they are available

* addressed the comments

* refactor init_clients in sam delete (#5360)

* refactor init_clients in sam delete

* remove unused line

* use client_provider

* fix broken tests

* Update samcli/commands/delete/delete_context.py

Co-authored-by: Mehmet Nuri Deveci <[email protected]>

* add telemetry

* fix format

---------

Co-authored-by: Mehmet Nuri Deveci <[email protected]>

* chore: update aws-sam-translator to 1.69.0 (#5370)

Co-authored-by: GitHub Action <[email protected]>

* feat: sam remote invoke help text and UX fixes (#5366)

* Improve remote invoke help text and fix some UX bugs

* Updated help text for parameter option

* Updated test class name

* Updated test method name

* Updated help text for output-format and event-file

* Address feedback

* Updated help text for parameter option

* Changed --output-format name to output and the values to text/json

* Handle empty event for lambda and read from stdin when - is passed for event-file

* chore: temporary pin python version to 3.7.16 (#5384)

* chore: temporary pin python version to 3.7.16

* fix github action syntax error

* Updated cfn-lint to support ruby3.2 in validate (#5375)

* Remove unneeded test cases (#5374)

* Remove unneeded test cases

* Removing the two integ test cases as there is already coverage in unit test for cases that no region is specified

* feat: updating app templates repo hash with (67f28fd83477e0e15b394f995afb33b2053b4074) (#5362)

Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Mehmet Nuri Deveci <[email protected]>

* test: Integration tests for remote invoke on regular lambda functions (#5382)

* Created base integ glass for remote invoke tests

* Add integration tests for invoking lambda functions

* make black

* Moved tearDownClass to base class

* Removed tearDown class from inherited classes and updated lambda fn timeout

* Remove the check to skip appveyor tests on master branch

* feat: Make remote invoke command available (#5381)

* Enabled remote invoke command and updated docs link

* Created base integ glass for remote invoke tests

* Added end2end integ tests for remote invoke

* make black

* Moved tearDownClass to base class

* Remove the check to skip appveyor tests on master branch

* test: Remote invoke integration tests for response stream configured lambda functions  (#5383)

* Created base integ glass for remote invoke tests

* Add integration tests for invoking response streaming lambda fns

* make black

* Moved tearDownClass to base class

* Moved tearDownClass method to base class and removed architectures from template file

* Remove the check to skip appveyor tests on master branch

* chore: bump version to 1.88.0 (#5393)

* chore: fix issues with appveyor ubuntu setup #5395

* chore: remove deprecated runtime dotnetcore3.1 (#5091)

* chore: remove deprecated runtime dotnetcore3.1

* apply pr comments

* fix(invoke): Write in UTF-8 string instead of bytes. (#5232)

* fix(invoke): Write in UTF-8 string instead of bytes.

It appears that we were using sys.stdout.buffer to support python2
and python3 at the same time. Switching to just write to sys.stdout
allows us to write a utf-8 encoding string. When using sys.stdout.buffer,
we can only write bytes and I couldn't get the correct UTF8 encoded
string to print correctly.

* Fix ruff errors

* Update log_streamer.py to remove encoding

* More updates to make everything work better in general

* Fix with ruff again

* Explictingly write to stream for building images

* More patching writes

* More patching

* Fix long line

* Use mock over io.string

* More fixing of tests

* Assert mock instead of data directly

* More small edits in test

* Verify through calls instead of value

* run make black

* Fix when we flush to match pervious behavior and output

* add integration tests

* run make black

---------

Co-authored-by: Jacob Fuss <[email protected]>
Co-authored-by: Mehmet Nuri Deveci <[email protected]>

* Revert "fix(invoke): Write in UTF-8 string instead of bytes. (#5232)" (#5401)

This reverts commit 97104ea.

* Add sanity check script and use it in pyinstaller GHA (#5400)

* Add sanity check script and use it in pyinstaller GHA

* set pipefail in sanity-check.sh

* Make CI_OVERRIDE a global env var in the GHA workflow

* setup go in GHA

* disable telemetry

* Update script to check binary existence and to fix an issue in go build

* Resolve changes

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Mohamed Elasmar <[email protected]>
Co-authored-by: Lucas <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Jacob Fuss <[email protected]>
Co-authored-by: Jacob Fuss <[email protected]>
Co-authored-by: Sriram Madapusi Vasudevan <[email protected]>
Co-authored-by: Mehmet Nuri Deveci <[email protected]>
Co-authored-by: Wing Fung Lau <[email protected]>
Co-authored-by: hnnasit <[email protected]>
Co-authored-by: Daniel Mil <[email protected]>
Co-authored-by: Slava Senchenko <[email protected]>
Co-authored-by: Leonardo Gama <[email protected]>
  • Loading branch information
15 people authored Jun 23, 2023
1 parent 8a7bbe6 commit 44daa48
Show file tree
Hide file tree
Showing 204 changed files with 5,206 additions and 1,447 deletions.
57 changes: 55 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ jobs:
- make-pr
- integration-tests
- smoke-and-functional-tests
- docker-disabled
steps:
- name: report-failure
if : |
needs.make-pr.result != 'success' ||
needs.integration-tests.result != 'success' ||
needs.smoke-and-functional-tests.result != 'success'
needs.smoke-and-functional-tests.result != 'success' ||
needs.docker-disabled.result != 'success'
run: exit 1
- name: report-success
run: exit 0
Expand All @@ -45,18 +47,27 @@ jobs:
fail-fast: false
matrix:
os:
# TODO: Add macos-latest; fails currently, see e.g. https://github.com/aws/aws-sam-cli/actions/runs/3596883449/jobs/6058055981
- macos-latest
- ubuntu-latest
- windows-latest
python:
- "3.7"
- "3.8"
- "3.9"
- "3.11"
steps:
- uses: actions/checkout@v3
# @melasmar
# TODO: Revert back to use 3.7 to all operating systems after the regression issue in Python
# https://github.com/actions/setup-python/issues/682 in github action got resolved
- uses: actions/setup-python@v4
if: matrix.os != 'macos-latest' || ( matrix.os == 'macos-latest' && matrix.python != '3.7' )
with:
python-version: ${{ matrix.python }}
- uses: actions/setup-python@v4
if: matrix.os == 'macos-latest' && matrix.python == '3.7'
with:
python-version: "3.7.16"
- run: test -f "./.github/ISSUE_TEMPLATE/Bug_report.md" # prevent Bug_report.md from being renamed or deleted
- run: make init
- run: make pr
Expand Down Expand Up @@ -112,6 +123,7 @@ jobs:
3.8
3.9
3.10
3.11
${{ matrix.python }}
- uses: actions/setup-go@v4
with:
Expand Down Expand Up @@ -178,6 +190,7 @@ jobs:
- "3.7"
- "3.8"
- "3.9"
- "3.11"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -187,3 +200,43 @@ jobs:
run: make init
- name: Run functional & smoke tests
run: pytest -vv -n 4 tests/functional tests/smoke

docker-disabled:
name: Docker-disabled Tests / ${{ matrix.os }}
if: github.repository_owner == 'aws'
runs-on: ${{ matrix.os }}
env:
SAM_CLI_DEV: "1"
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
# These are the versions of Python that correspond to the supported Lambda runtimes
python-version: |
3.10
3.9
3.8
3.7
- name: Init samdev
run: make init
- name: Stop Docker Linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo systemctl stop docker
- name: Stop Docker Windows
if: ${{ matrix.os == 'windows-latest' }}
shell: pwsh
run: stop-service docker
- name: Check Docker not Running
run: docker info
id: run-docker-info
continue-on-error: true
- name: Report failure
if: steps.run-docker-info.outcome == 'success'
run: exit 1
- name: Run tests without Docker
run: pytest -vv tests/integration/buildcmd/test_build_cmd.py -k TestBuildCommand_PythonFunctions_WithoutDocker
17 changes: 15 additions & 2 deletions .github/workflows/validate_pyinstaller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches:
- develop

env:
CI_OVERRIDE: "1"

jobs:
build-for-linux:
name: build-pyinstaller-linux
Expand All @@ -15,15 +18,20 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
- name: Build PyInstaller
run: |
chmod +x ./installer/pyinstaller/build-linux.sh
CI_OVERRIDE=1 ./installer/pyinstaller/build-linux.sh aws-sam-cli-linux-x86_64.zip
./installer/pyinstaller/build-linux.sh aws-sam-cli-linux-x86_64.zip
- name: Basic tests for PyInstaller
run: |
unzip .build/output/aws-sam-cli-linux-x86_64.zip -d sam-installation
./sam-installation/install
sam-beta --version
./tests/sanity-check.sh
- uses: actions/upload-artifact@v3
with:
name: pyinstaller-linux-zip
Expand All @@ -41,15 +49,20 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: "3.7"
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"
- name: Build PyInstaller
run: |
chmod +x ./installer/pyinstaller/build-mac.sh
CI_OVERRIDE=1 ./installer/pyinstaller/build-mac.sh aws-sam-cli-macos-x86_64.zip
./installer/pyinstaller/build-mac.sh aws-sam-cli-macos-x86_64.zip
- name: Basic tests for PyInstaller
run: |
unzip .build/output/aws-sam-cli-macos-x86_64.zip -d sam-installation
sudo ./sam-installation/install
sam-beta --version
./tests/sanity-check.sh
- uses: actions/upload-artifact@v3
with:
name: pyinstaller-macos-zip
Expand Down
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -412,12 +412,6 @@ coverage.xml

# Temporary scratch directory used by the tests
tests/integration/buildcmd/scratch
tests/integration/testdata/buildcmd/Dotnetcore2.0/bin
tests/integration/testdata/buildcmd/Dotnetcore2.0/obj
tests/integration/testdata/buildcmd/Dotnetcore2.1/bin
tests/integration/testdata/buildcmd/Dotnetcore2.1/obj
tests/integration/testdata/buildcmd/Dotnetcore3.1/bin
tests/integration/testdata/buildcmd/Dotnetcore3.1/obj
tests/integration/testdata/buildcmd/Dotnet6/bin
tests/integration/testdata/buildcmd/Dotnet6/obj
tests/integration/testdata/buildcmd/Dotnet7/bin
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ lint:
# Linter performs static analysis to catch latent bugs
ruff samcli
# mypy performs type check
mypy --no-incremental setup.py samcli tests
mypy --exclude /testdata/ --exclude /init/templates/ --no-incremental setup.py samcli tests

# Command to run everytime you make changes to verify everything works
dev: lint test
Expand Down
61 changes: 8 additions & 53 deletions appveyor-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ environment:
- PYTHON_HOME: "$HOME/venv3.8/bin"
PYTHON_VERSION: '3.8'

- PYTHON_HOME: "$HOME/venv3.9/bin"
PYTHON_VERSION: '3.9'
- PYTHON_HOME: "$HOME/venv3.11/bin"
PYTHON_VERSION: '3.11'

install:
# AppVeyor's apt-get cache might be outdated, and the package could potentially be 404.
- sh: "sudo apt-get update"
- sh: "sudo apt-get update --allow-releaseinfo-change"

- sh: "gvm use go1.19"
- sh: "echo $PATH"
Expand All @@ -61,7 +61,8 @@ install:

- sh: "source ${HOME}/venv${PYTHON_VERSION}/bin/activate"
- sh: "rvm use 2.7.2"
- sh: "docker --version"
- sh: "docker info"
- sh: "docker version"
- sh: "nvm install ${NODE_VERSION}"
- sh: "npm install [email protected] -g"
- sh: "npm -v"
Expand All @@ -86,7 +87,7 @@ install:
- sh: "sudo apt install -y jq"

# install Terraform
- sh: "sudo apt update"
- sh: "sudo apt update --allow-releaseinfo-change"
- sh: "TER_VER=`curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | grep tag_name | cut -d: -f2 | tr -d \\\"\\,\\v | awk '{$1=$1};1'`"
- sh: "wget https://releases.hashicorp.com/terraform/${TER_VER}/terraform_${TER_VER}_linux_amd64.zip -P /tmp"
- sh: "sudo unzip -d /opt/terraform /tmp/terraform_${TER_VER}_linux_amd64.zip"
Expand Down Expand Up @@ -149,7 +150,8 @@ install:


build_script:
- "python -c \"import sys; print(sys.executable)\""
- "python -c \"import sys; print(sys.executable)\""
- "make init"

# Final clean up no matter success or failure
on_finish:
Expand All @@ -176,10 +178,6 @@ for:
- configuration: BuildIntegTesting

test_script:
# Pre-dev Tests
- "pip install -e \".[pre-dev]\""

- "pip install -e \".[dev]\""
- sh: "pytest -vv tests/integration/buildcmd --ignore=tests/integration/buildcmd/test_build_terraform_applications.py --ignore=tests/integration/buildcmd/test_build_terraform_applications_other_cases.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# Set JAVA_HOME to java11
Expand All @@ -193,10 +191,6 @@ for:
- configuration: LocalZipTerraformBuildIntegTesting

test_script:
# Pre-dev Tests
- "pip install -e \".[pre-dev]\""

- "pip install -e \".[dev]\""
- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndLocalBackend_0 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# Local ZIP Terraform Build In Container integ testing
Expand All @@ -206,10 +200,6 @@ for:
- configuration: LocalZipTerraformBuildInContainerIntegTesting

test_script:
# Pre-dev Tests
- "pip install -e \".[pre-dev]\""

- "pip install -e \".[dev]\""
- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndLocalBackend_1 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# S3 ZIP Terraform Build integ testing
Expand All @@ -219,10 +209,6 @@ for:
- configuration: S3ZipTerraformBuildIntegTesting

test_script:
# Pre-dev Tests
- "pip install -e \".[pre-dev]\""

- "pip install -e \".[dev]\""
- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndS3Backend_0 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# S3 ZIP Terraform Build In Container integ testing
Expand All @@ -232,10 +218,6 @@ for:
- configuration: S3ZipTerraformBuildInContainerIntegTesting

test_script:
# Pre-dev Tests
- "pip install -e \".[pre-dev]\""

- "pip install -e \".[dev]\""
- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndS3Backend_1 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# Other Terraform Build In Container integ testing
Expand All @@ -245,10 +227,6 @@ for:
- configuration: OtherTerraformBuildIntegTesting

test_script:
# Pre-dev Tests
- "pip install -e \".[pre-dev]\""

- "pip install -e \".[dev]\""
- sh: "pytest -vv -n 4 tests/integration/buildcmd/test_build_terraform_applications_other_cases.py --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# Integ testing deploy
Expand All @@ -258,7 +236,6 @@ for:
- configuration: DeployIntegTesting

test_script:
- "pip install -e \".[dev]\""
- sh: "pytest -vv tests/integration/deploy -n 4 --reruns 4 --dist=loadgroup --json-report --json-report-file=TEST_REPORT-integration-deploy.json"

# Integ testing package
Expand All @@ -268,7 +245,6 @@ for:
- configuration: PackageIntegTesting

test_script:
- "pip install -e \".[dev]\""
- sh: "pytest -vv tests/integration/package -n 4 --reruns 4 --json-report --json-report-file=TEST_REPORT-integration-package.json"

# Integ testing delete
Expand All @@ -278,7 +254,6 @@ for:
- configuration: DeleteIntegTesting

test_script:
- "pip install -e \".[dev]\""
- sh: "pytest -vv tests/integration/delete -n 4 --reruns 4 --json-report --json-report-file=TEST_REPORT-integration-delete.json"

# Integ testing sync
Expand All @@ -288,7 +263,6 @@ for:
- configuration: SyncIntegTesting

test_script:
- "pip install -e \".[dev]\""
- sh: "pytest -vv tests/integration/sync -n 3 --reruns 3 --dist loadscope --json-report --json-report-file=TEST_REPORT-integration-sync.json"

# Integ testing local
Expand All @@ -298,11 +272,6 @@ for:
- configuration: LocalIntegTesting

test_script:
# Pre-dev Tests
- "pip install -e \".[pre-dev]\""
- "ruff samcli"

- "pip install -e \".[dev]\""
- sh: "pytest -vv tests/integration/local --json-report --json-report-file=TEST_REPORT-integration-local.json"

# End-to-end testing
Expand All @@ -312,7 +281,6 @@ for:
- configuration: EndToEndTesting

test_script:
- "pip install -e \".[dev]\""
- sh: "pytest -vv -n 4 --reruns 5 --dist loadscope tests/end_to_end --json-report --json-report-file=TEST_REPORT-end-to-end.json"

# Other testing
Expand All @@ -322,18 +290,5 @@ for:
- configuration: OtherTesting

test_script:
# Pre-dev Tests
- "pip install -e \".[pre-dev]\""
- "ruff samcli"

# Dev Tests
- "pip install -e \".[dev]\""
- "pytest --cov samcli --cov-report term-missing --cov-fail-under 94 tests/unit --json-report --json-report-file=TEST_REPORT-unit.json"
- "ruff samcli"
- "mypy setup.py samcli tests"
- "pytest -n 4 tests/functional --json-report --json-report-file=TEST_REPORT-functional.json"

- sh: "pytest -vv -n 4 --reruns 4 --dist loadgroup tests/integration --ignore=tests/integration/buildcmd --ignore=tests/integration/delete --ignore=tests/integration/deploy --ignore=tests/integration/package --ignore=tests/integration/sync --ignore=tests/integration/local --json-report --json-report-file=TEST_REPORT-integration-others.json"
- sh: "pytest -vv tests/regression --json-report --json-report-file=TEST_REPORT-regression.json"
- sh: "black --check setup.py tests samcli"
- sh: "pytest -n 4 -vv tests/smoke --json-report --json-report-file=TEST_REPORT-smoke.json"
Loading

0 comments on commit 44daa48

Please sign in to comment.