update to JDK 21 for integ tests #215
This file contains 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
name: Run Integration Tests | |
on: [workflow_dispatch, pull_request] | |
jobs: | |
Integration-Tests: | |
strategy: | |
matrix: | |
python-version: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install bz2 development package | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libbz2-dev | |
- uses: actions/setup-python@v4 | |
- uses: KengoTODA/actions-setup-docker-compose@v1 | |
with: | |
version: '1.29.2' | |
# - name: Enforce docker-compose v1 | |
# run: | | |
# echo "GitHub starts to switch runners to include docker-compose v2" | |
# echo "which uses 'docker compose' command to replace 'docker-compose'" | |
# echo "this would cause issues in our test validation so we enforce v1 here" | |
# echo "https://github.com/actions/runner-images/commit/2a4bc14da46f1f8e358aa902a69edb9bef135472" | |
# sudo apt-get remove -y docker-compose-plugin | |
# sudo pip install docker-compose==1.29.2 | |
# docker --version | |
# docker-compose --version | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- name: Install pyenv | |
run: git clone https://github.com/pyenv/pyenv.git ~/.pyenv | |
# Integration tests require two different JDK versions: | |
# - JDK 21: Required for Gradle builds after upgrade to Apache Lucene 10 | |
# - JDK 17: Required for OpenSearch runtime operations | |
- name: Install JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- run: | | |
echo "JAVA17_HOME=$JAVA_HOME" >> $GITHUB_ENV | |
# Save this path for later | |
echo "OPENSEARCH_JAVA_HOME=$JAVA_HOME" >> $GITHUB_ENV | |
- name: Install JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: '21' | |
- run: | | |
echo "JAVA21_HOME=$JAVA_HOME" >> $GITHUB_ENV | |
# Make Java 21 the default | |
echo "JAVA_HOME=$JAVA_HOME" >> $GITHUB_ENV | |
- name: Run the CI build script | |
run: bash .ci/build.sh run_it ${{ matrix.python-version }} |