From 80db33cb44c77331b3b53bc7cba2caf56e61c5fb Mon Sep 17 00:00:00 2001 From: Bert Blommers Date: Sun, 30 Oct 2022 10:18:06 -0100 Subject: [PATCH] Admin: Enable support for Py 3.11 (#5619) --- .github/workflows/build.yml | 18 +++++++++--------- .github/workflows/dockertests.yml | 8 ++++---- .github/workflows/test_outdated_versions.yml | 4 +--- .github/workflows/test_terraform.yml | 6 +++--- codecov.yml | 2 +- setup.py | 1 + 6 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 398bc1590..054c9b755 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ 3.6, 3.7, 3.8, 3.9, "3.10" ] + python-version: [ 3.6, 3.7, 3.8, 3.9, "3.10", "3.11" ] steps: - uses: actions/checkout@v3 @@ -19,7 +19,7 @@ jobs: - name: Get pip cache dir id: pip-cache-dir run: | - echo "::set-output name=dir::$(pip cache dir)" + echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT - name: pip cache id: pip-cache uses: actions/cache@v3 @@ -52,7 +52,7 @@ jobs: - name: Get pip cache dir id: pip-cache run: | - echo "::set-output name=dir::$(pip cache dir)" + echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT - name: pip cache uses: actions/cache@v3 with: @@ -77,7 +77,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.6, 3.7, 3.8, 3.9, "3.10"] + python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11"] steps: - uses: actions/checkout@v3 @@ -90,7 +90,7 @@ jobs: - name: Get pip cache dir id: pip-cache run: | - echo "::set-output name=dir::$(pip cache dir)" + echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT - name: pip cache uses: actions/cache@v3 with: @@ -111,7 +111,7 @@ jobs: make test-only - name: "Upload coverage to Codecov" if: ${{ github.repository == 'spulec/moto'}} - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v3 with: fail_ci_if_error: false flags: unittests @@ -123,7 +123,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.6, 3.7, 3.8, 3.9, "3.10"] + python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11"] steps: - uses: actions/checkout@v3 @@ -141,7 +141,7 @@ jobs: - name: Get pip cache dir id: pip-cache run: | - echo "::set-output name=dir::$(pip cache dir)" + echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT - name: pip cache uses: actions/cache@v3 with: @@ -161,7 +161,7 @@ jobs: make test-only - name: "Upload coverage to Codecov" if: ${{ github.repository == 'spulec/moto'}} - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v3 with: fail_ci_if_error: false flags: servertests diff --git a/.github/workflows/dockertests.yml b/.github/workflows/dockertests.yml index 27aa3f492..6beebc8ca 100644 --- a/.github/workflows/dockertests.yml +++ b/.github/workflows/dockertests.yml @@ -19,7 +19,7 @@ jobs: - name: Get pip cache dir id: pip-cache-dir run: | - echo "::set-output name=dir::$(pip cache dir)" + echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT - name: pip cache id: pip-cache uses: actions/cache@v3 @@ -59,7 +59,7 @@ jobs: - name: Get pip cache dir id: pip-cache run: | - echo "::set-output name=dir::$(pip cache dir)" + echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT - name: pip cache uses: actions/cache@v3 with: @@ -118,7 +118,7 @@ jobs: - name: Get pip cache dir id: pip-cache run: | - echo "::set-output name=dir::$(pip cache dir)" + echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT - name: pip cache uses: actions/cache@v3 with: @@ -174,7 +174,7 @@ jobs: - name: Get pip cache dir id: pip-cache run: | - echo "::set-output name=dir::$(pip cache dir)" + echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT - name: pip cache uses: actions/cache@v3 with: diff --git a/.github/workflows/test_outdated_versions.yml b/.github/workflows/test_outdated_versions.yml index eb538e8f4..1aeff3d79 100644 --- a/.github/workflows/test_outdated_versions.yml +++ b/.github/workflows/test_outdated_versions.yml @@ -13,9 +13,8 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ "3.10" ] + python-version: [ "3.11" ] responses-version: ["0.13.0", "0.15.0", "0.17.0", "0.19.0", "0.20.0" ] - mock-version: [ "3.0.5", "4.0.0", "4.0.3" ] werkzeug-version: ["2.0.1", "2.1.1", "2.2.2"] openapi-spec-validator-version: ["0.4.0", "0.5.0"] @@ -36,7 +35,6 @@ jobs: run: | pip install -r requirements-dev.txt pip install responses==${{ matrix.responses-version }} - pip install mock==${{ matrix.mock-version }} pip install flask==${{ matrix.werkzeug-version }} pip install werkzeug==${{ matrix.werkzeug-version }} pip install openapi-spec-validator==${{ matrix.openapi-spec-validator-version }} diff --git a/.github/workflows/test_terraform.yml b/.github/workflows/test_terraform.yml index 3c05362bb..ce4bde102 100644 --- a/.github/workflows/test_terraform.yml +++ b/.github/workflows/test_terraform.yml @@ -6,7 +6,7 @@ jobs: steps: - uses: actions/checkout@v3 - id: set-matrix - run: echo "::set-output name=matrix::$(python tests/terraformtests/get_tf_services.py --names)" + run: echo "matrix=$(python tests/terraformtests/get_tf_services.py --names)" >> $GITHUB_OUTPUT outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} test_service: @@ -46,10 +46,10 @@ jobs: ${{ runner.os }}-go-${{ matrix.go-version }}- - name: Get list of tests for this service id: get-list - run: echo "::set-output name=testlist::$(python tests/terraformtests/get_tf_tests.py '${{ matrix.service }}')" + run: echo "testlist=$(python tests/terraformtests/get_tf_tests.py '${{ matrix.service }}')" >> $GITHUB_OUTPUT - name: Get original AWS service name id: get-service-name - run: echo "::set-output name=servicename::$(python -c "print('${{ matrix.service }}'[:'${{ matrix.service }}'.index('|') if '|' in '${{ matrix.service }}' else len('${{ matrix.service }}')])")" + run: echo "servicename=$(python -c "print('${{ matrix.service }}'[:'${{ matrix.service }}'.index('|') if '|' in '${{ matrix.service }}' else len('${{ matrix.service }}')])")" >> $GITHUB_OUTPUT - name: Execute tests run: | make terraformtests SERVICE_NAME=${{ steps.get-service-name.outputs.servicename }} TEST_NAMES=${{ steps.get-list.outputs.testlist }} diff --git a/codecov.yml b/codecov.yml index 750eb3b17..69c33d4f8 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,7 +1,7 @@ codecov: notify: # Leave a GitHub comment after all builds have passed - after_n_builds: 10 + after_n_builds: 12 coverage: status: project: diff --git a/setup.py b/setup.py index 993a7ae1e..a4661b071 100755 --- a/setup.py +++ b/setup.py @@ -151,6 +151,7 @@ setup( "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "License :: OSI Approved :: Apache Software License", "Topic :: Software Development :: Testing", ],