Merge branch 'awslabs:master' into master #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Build Intensive | |
on: | |
push: | |
branches: [ master ] | |
pull_request_target: | |
branches: [ master ] | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
build-intensive: | |
timeout-minutes: 8 | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ "3.8", "3.9", "3.10", "3.11" ] | |
os: [ ubuntu-latest, macOS-latest, windows-latest ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-region: us-east-1 | |
role-to-assume: arn:aws:iam::751999266872:role/GitHubWorkflows | |
role-session-name: myGitHubActions | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '8' | |
distribution: 'corretto' | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Python and required pips | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install -r test_requirements.txt | |
pip install build | |
- name: Test with Pytest | |
run: | | |
python -m pytest | |
- name: Install .jar files | |
run: | | |
python -m build | |
python setup.py download_jars | |
python setup.py install | |
- name: Put words to sample stream | |
run: | | |
sample_kinesis_wordputter.py --stream kclpysample -w cat -w dog -w bird -w lobster -w octopus | |
- name: Start KCL application (windows or ubuntu) | |
if: matrix.os != 'macOS-latest' | |
run: | | |
timeout 45 $(amazon_kclpy_helper.py --print_command --java $(which java) --properties samples/sample.properties) || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi | |
- name: Start KCL application (macOS) | |
if: matrix.os == 'macOS-latest' | |
run: | | |
brew install coreutils | |
gtimeout 45 $(amazon_kclpy_helper.py --print_command --java $(which java) --properties samples/sample.properties) || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi |