Skip to content

Commit

Permalink
chore: cleanup appveyor definitions for not running jobs which is alr…
Browse files Browse the repository at this point in the history
…eady run with GHA & add docker info/version commands (aws#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
  • Loading branch information
mndeveci authored and Leonardo Gama committed Jun 22, 2023
1 parent f653082 commit f25e6be
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 106 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,14 @@ 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
- uses: actions/setup-python@v4
Expand Down Expand Up @@ -114,6 +115,7 @@ jobs:
3.8
3.9
3.10
3.11
${{ matrix.python }}
- uses: actions/setup-go@v4
with:
Expand Down Expand Up @@ -180,6 +182,7 @@ jobs:
- "3.7"
- "3.8"
- "3.9"
- "3.11"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand Down
53 changes: 4 additions & 49 deletions appveyor-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 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"
65 changes: 9 additions & 56 deletions appveyor-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ install:
- "echo %PATH%"
- "python --version"
- "docker info"
- "docker version"

# install Terraform CLI
- "choco install terraform"
Expand Down Expand Up @@ -135,6 +136,13 @@ install:

- "IF DEFINED BY_CANARY ECHO Logging in Public ECR && aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws"

# claim some disk space before starting the tests
- "docker system prune -a -f"
# activate virtual environment
- "venv\\Scripts\\activate"



# Final clean up no matter success or failure
on_finish:
# Upload test reports as artifacts
Expand Down Expand Up @@ -181,10 +189,6 @@ for:
- cargo lambda -V

test_script:
# Reactivate virtualenv before running tests
- "git --version"
- "venv\\Scripts\\activate"
- "docker system prune -a -f"
- ps: "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"

# Local ZIP Terraform Build integ testing
Expand All @@ -193,10 +197,6 @@ for:
- configuration: LocalZipTerraformBuildIntegTesting

test_script:
# Reactivate virtualenv before running tests
- "git --version"
- "venv\\Scripts\\activate"
- "docker system prune -a -f"
- ps: "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 @@ -205,10 +205,6 @@ for:
- configuration: LocalZipTerraformBuildInContainerIntegTesting

test_script:
# Reactivate virtualenv before running tests
- "git --version"
- "venv\\Scripts\\activate"
- "docker system prune -a -f"
- ps: "pytest -vv 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 @@ -217,10 +213,6 @@ for:
- configuration: S3ZipTerraformBuildIntegTesting

test_script:
# Reactivate virtualenv before running tests
- "git --version"
- "venv\\Scripts\\activate"
- "docker system prune -a -f"
- ps: "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 @@ -229,10 +221,6 @@ for:
- configuration: S3ZipTerraformBuildInContainerIntegTesting

test_script:
# Reactivate virtualenv before running tests
- "git --version"
- "venv\\Scripts\\activate"
- "docker system prune -a -f"
- ps: "pytest -vv tests/integration/buildcmd/test_build_terraform_applications.py::TestBuildTerraformApplicationsWithZipBasedLambdaFunctionAndS3Backend_1 --json-report --json-report-file=TEST_REPORT-integration-buildcmd.json"

# Other Terraform Build integ testing
Expand All @@ -241,10 +229,6 @@ for:
- configuration: OtherTerraformBuildIntegTesting

test_script:
# Reactivate virtualenv before running tests
- "git --version"
- "venv\\Scripts\\activate"
- "docker system prune -a -f"
- ps: "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 @@ -253,10 +237,6 @@ for:
- configuration: DeployIntegTesting

test_script:
# Reactivate virtualenv before running tests
- "git --version"
- "venv\\Scripts\\activate"
- "docker system prune -a -f"
- ps: "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 @@ -265,10 +245,6 @@ for:
- configuration: PackageIntegTesting

test_script:
# Reactivate virtualenv before running tests
- "git --version"
- "venv\\Scripts\\activate"
- "docker system prune -a -f"
- ps: "pytest -vv tests/integration/package -n 4 --reruns 4 --json-report --json-report-file=TEST_REPORT-integration-package.json"

# Integ testing delete
Expand All @@ -277,10 +253,6 @@ for:
- configuration: DeleteIntegTesting

test_script:
# Reactivate virtualenv before running tests
- "git --version"
- "venv\\Scripts\\activate"
- "docker system prune -a -f"
- ps: "pytest -vv tests/integration/delete -n 4 --reruns 4 --json-report --json-report-file=TEST_REPORT-integration-delete.json"

# Integ testing sync
Expand All @@ -289,10 +261,6 @@ for:
- configuration: SyncIntegTesting

test_script:
# Reactivate virtualenv before running tests
- "git --version"
- "venv\\Scripts\\activate"
- "docker system prune -a -f"
- ps: "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 @@ -301,10 +269,6 @@ for:
- configuration: LocalIntegTesting

test_script:
# Reactivate virtualenv before running tests
- "git --version"
- "venv\\Scripts\\activate"
- "docker system prune -a -f"
- ps: "pytest -vv tests/integration/local --json-report --json-report-file=TEST_REPORT-integration-local.json"

# End-to-end testing
Expand All @@ -313,10 +277,6 @@ for:
- configuration: EndToEndTesting

test_script:
# Reactivate virtualenv before running tests
- "git --version"
- "venv\\Scripts\\activate"
- "docker system prune -a -f"
- ps: "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 @@ -325,16 +285,9 @@ for:
- configuration: OtherTesting

test_script:
# Reactivate virtualenv before running tests
- "git --version"
- "venv\\Scripts\\activate"
- "docker system prune -a -f"
- ps: "pytest --cov samcli --cov-report term-missing --cov-fail-under 94 tests/unit --json-report --json-report-file=TEST_REPORT-unit.json"
- "mypy setup.py samcli tests"
- ps: "pytest -n 4 tests/functional --json-report --json-report-file=TEST_REPORT-functional.json"
- ps: "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"
- ps: "pytest -vv tests/regression --json-report --json-report-file=TEST_REPORT-regression.json"
# Uncomment for RDP
# on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))


0 comments on commit f25e6be

Please sign in to comment.