-
-
Notifications
You must be signed in to change notification settings - Fork 2k
72 lines (64 loc) · 2.68 KB
/
test_outdated_versions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Run separate test cases to verify Moto works with older versions of dependencies
#
name: "Outdated Dependency Tests"
on:
pull_request:
types: [ labeled ]
jobs:
test:
if: ${{ github.event.label.name == 'moto-core' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
botocore: ["--upgrade boto3 botocore", "--upgrade boto3 botocore && pip install urllib3==2.2.1", "boto3==1.11.0 botocore==1.14.0"]
python-version: [ "3.11" ]
responses-version: ["0.15.0", "0.17.0", "0.19.0", "0.20.0" ]
werkzeug-version: ["2.0.1", "2.1.1", "2.2.2"]
openapi-spec-validator-version: ["0.5.0"]
cryptography-version: ["39.0.0"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Update pip
run: |
python -m pip install --upgrade pip
- name: Install project dependencies
run: |
pip install -r requirements-dev.txt
pip install responses==${{ matrix.responses-version }}
pip install flask==${{ matrix.werkzeug-version }}
pip install werkzeug==${{ matrix.werkzeug-version }}
pip install openapi-spec-validator==${{ matrix.openapi-spec-validator-version }}
pip install ${{ matrix.botocore }}
pip install cryptography==${{ matrix.cryptography-version }}
- name: Run tests
run: |
pytest -sv tests/test_core ./tests/test_apigateway/test_apigateway_integration.py tests/test_iotdata ./tests/test_s3/test_server.py
- name: Start MotoServer
run: |
python -m build
docker run --rm -t --name motoserver -e TEST_SERVER_MODE=true -e AWS_SECRET_ACCESS_KEY=server_secret -e AWS_ACCESS_KEY_ID=server_key -v `pwd`:/moto -p 5000:5000 -v /var/run/docker.sock:/var/run/docker.sock python:3.9-slim /moto/scripts/ci_moto_server.sh &
python scripts/ci_wait_for_server.py
- name: Test ServerMode/Coverage
env:
TEST_SERVER_MODE: ${{ true }}
run: |
pytest -sv tests/test_core tests/test_awslambda tests/test_cloudformation tests/test_iotdata
- name: "Stop MotoServer"
if: always()
run: |
mkdir serverlogs
cp server_output.log serverlogs/server_output.log
docker stop motoserver
- name: Archive TF logs
if: always()
uses: actions/upload-artifact@v4
with:
name: test-${{ matrix.responses-version }}-${{ matrix.werkzeug-version }}-${{ matrix.werkzeug-version }}-${{ matrix.openapi-spec-validator-version }}-${{ matrix.botocore }}
path: |
serverlogs/*