2023-03-03 14:12:16 +00:00
|
|
|
name: Java SDK test
|
|
|
|
on: [workflow_call]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2023-09-05 17:33:10 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-03-03 14:12:16 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2023-03-24 10:46:37 +00:00
|
|
|
- name: Set up Python 3.8
|
2023-12-11 23:47:25 +00:00
|
|
|
uses: actions/setup-python@v5
|
2023-03-03 14:12:16 +00:00
|
|
|
with:
|
2024-01-06 19:20:57 +00:00
|
|
|
python-version: "3.10"
|
2023-03-03 14:12:16 +00:00
|
|
|
- name: Start MotoServer
|
|
|
|
run: |
|
|
|
|
pip install build
|
|
|
|
python -m build
|
2023-11-23 11:04:20 +00:00
|
|
|
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.10-slim /moto/scripts/ci_moto_server.sh &
|
2023-03-03 14:12:16 +00:00
|
|
|
python scripts/ci_wait_for_server.py
|
2023-12-05 09:40:30 +00:00
|
|
|
- uses: actions/setup-java@v4
|
2023-03-03 14:12:16 +00:00
|
|
|
with:
|
|
|
|
distribution: 'temurin'
|
|
|
|
java-version: '17'
|
|
|
|
cache: 'maven'
|
|
|
|
- name: Build with Maven
|
|
|
|
run: |
|
|
|
|
mkdir ~/.aws && touch ~/.aws/credentials && echo -e "[default]\naws_access_key_id = test\naws_secret_access_key = test" > ~/.aws/credentials
|
|
|
|
cd other_langs/tests_java && mvn test
|