Skip to content

Commit

Permalink
Use 5.0.5
Browse files Browse the repository at this point in the history
Signed-off-by: Andre Kurait <[email protected]>
  • Loading branch information
AndreKurait committed Nov 20, 2024
1 parent fcd1218 commit f003574
Showing 1 changed file with 121 additions and 121 deletions.
242 changes: 121 additions & 121 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ jobs:
matrix:
py-project:
- lib/console_link
- cluster_tools
- console_api
# - cluster_tools
# - console_api
env:
WORKING_DIR: ./TrafficCapture/dockerSolution/src/main/docker/migrationConsole/${{ matrix.py-project }}
defaults:
Expand Down Expand Up @@ -99,120 +99,120 @@ jobs:
path: ${{ env.WORKING_DIR }}/coverage.xml


gradle-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: ${{ env.java-version }}
distribution: 'corretto'
- uses: gradle/actions/setup-gradle@v4
with:
gradle-version: ${{ env.gradle-version }}
gradle-home-cache-cleanup: true
- name: Run Gradle Build
run: ./gradlew build -x test -x TrafficCapture:dockerSolution:build -x spotlessCheck --stacktrace
env:
OS_MIGRATIONS_GRADLE_SCAN_TOS_AGREE_AND_ENABLED: ''
# gradle-tests:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-java@v4
# with:
# java-version: ${{ env.java-version }}
# distribution: 'corretto'
# - uses: gradle/actions/setup-gradle@v4
# with:
# gradle-version: ${{ env.gradle-version }}
# gradle-home-cache-cleanup: true
# - name: Run Gradle Build
# run: ./gradlew build -x test -x TrafficCapture:dockerSolution:build -x spotlessCheck --stacktrace
# env:
# OS_MIGRATIONS_GRADLE_SCAN_TOS_AGREE_AND_ENABLED: ''

- name: Run Tests with Coverage
run: ./gradlew mergeJacocoReports -x TrafficCapture:dockerSolution:build -x spotlessCheck --stacktrace
env:
OS_MIGRATIONS_GRADLE_SCAN_TOS_AGREE_AND_ENABLED: ''
# - name: Run Tests with Coverage
# run: ./gradlew mergeJacocoReports -x TrafficCapture:dockerSolution:build -x spotlessCheck --stacktrace
# env:
# OS_MIGRATIONS_GRADLE_SCAN_TOS_AGREE_AND_ENABLED: ''

- uses: actions/upload-artifact@v4
if: always()
with:
name: test-reports-gradle-tests
path: |
**/build/reports/tests/
**/reports/jacoco/mergedReport/
- name: Upload Coverage Reports
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: coverage-reports-gradle-tests
path: ./**/jacocoMergedReport.xml
# - uses: actions/upload-artifact@v4
# if: always()
# with:
# name: test-reports-gradle-tests
# path: |
# **/build/reports/tests/
# **/reports/jacoco/mergedReport/
# - name: Upload Coverage Reports
# uses: actions/upload-artifact@v4
# with:
# if-no-files-found: error
# name: coverage-reports-gradle-tests
# path: ./**/jacocoMergedReport.xml


python-e2e-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: ${{ env.java-version }}
distribution: 'corretto'
- uses: gradle/actions/setup-gradle@v4
with:
gradle-version: ${{ env.gradle-version }}
- uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
- name: Generate Cache Key from Dockerfiles
id: generate_cache_key
run: |
files=$(find . -type f \( -name 'docker-compose.yml' -o -name 'Dockerfile' \))
file_contents=$(cat $files)
key=$(echo "${file_contents}" | sha1sum | awk '{print $1}')
echo "key=${key}" >> "$GITHUB_OUTPUT"
- name: Cache Docker Images
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}-${{ steps.generate_cache_key.outputs.key }}
- name: Start Docker Solution
run: ./gradlew -p TrafficCapture dockerSolution:ComposeUp -x test -x spotlessCheck --info --stacktrace
env:
OS_MIGRATIONS_GRADLE_SCAN_TOS_AGREE_AND_ENABLED: ''
- name: Run E2E test script
working-directory: TrafficCapture/dockerSolution/src/main/docker/migrationConsole/lib/integ_test
run: |
docker exec $(docker ps --filter "name=migration-console" -q) pipenv run pytest /root/lib/integ_test/integ_test/replayer_tests.py --unique_id="testindex" -s
- name: Collect Docker, OpenSearch Benchmark, and Shared Logs
if: always()
run: |
mkdir -p logs/docker logs/opensearch_benchmark_logs logs/shared_logs_output
for container in $(docker ps -aq); do
container_name=$(docker inspect --format '{{.Name}}' $container | sed 's/\///')
docker logs $container > logs/docker/${container_name}_logs.txt 2>&1
done
docker cp $(docker ps --filter "name=migration-console" -q):/root/.benchmark/logs logs/opensearch_benchmark_logs
docker cp $(docker ps --filter "name=migration-console" -q):/shared-logs-output logs/shared_logs_output
- name: Upload Logs
if: always()
uses: actions/upload-artifact@v4
with:
name: e2e-test-logs
path: |
logs/docker
logs/opensearch_benchmark_logs
logs/shared_logs_output
- name: Clean up migrations docker images before caching
run: |
docker stop $(docker ps -q) && docker system prune --volumes -f
docker image ls --format '{{.Repository}}:{{.Tag}}' | grep '^migrations/' | xargs -I {} docker image rm {}
# python-e2e-tests:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-java@v4
# with:
# java-version: ${{ env.java-version }}
# distribution: 'corretto'
# - uses: gradle/actions/setup-gradle@v4
# with:
# gradle-version: ${{ env.gradle-version }}
# - uses: actions/setup-python@v5
# with:
# python-version: ${{ env.python-version }}
# - name: Generate Cache Key from Dockerfiles
# id: generate_cache_key
# run: |
# files=$(find . -type f \( -name 'docker-compose.yml' -o -name 'Dockerfile' \))
# file_contents=$(cat $files)
# key=$(echo "${file_contents}" | sha1sum | awk '{print $1}')
# echo "key=${key}" >> "$GITHUB_OUTPUT"
# - name: Cache Docker Images
# uses: ScribeMD/[email protected]
# with:
# key: docker-${{ runner.os }}-${{ steps.generate_cache_key.outputs.key }}
# - name: Start Docker Solution
# run: ./gradlew -p TrafficCapture dockerSolution:ComposeUp -x test -x spotlessCheck --info --stacktrace
# env:
# OS_MIGRATIONS_GRADLE_SCAN_TOS_AGREE_AND_ENABLED: ''
# - name: Run E2E test script
# working-directory: TrafficCapture/dockerSolution/src/main/docker/migrationConsole/lib/integ_test
# run: |
# docker exec $(docker ps --filter "name=migration-console" -q) pipenv run pytest /root/lib/integ_test/integ_test/replayer_tests.py --unique_id="testindex" -s
# - name: Collect Docker, OpenSearch Benchmark, and Shared Logs
# if: always()
# run: |
# mkdir -p logs/docker logs/opensearch_benchmark_logs logs/shared_logs_output
# for container in $(docker ps -aq); do
# container_name=$(docker inspect --format '{{.Name}}' $container | sed 's/\///')
# docker logs $container > logs/docker/${container_name}_logs.txt 2>&1
# done
# docker cp $(docker ps --filter "name=migration-console" -q):/root/.benchmark/logs logs/opensearch_benchmark_logs
# docker cp $(docker ps --filter "name=migration-console" -q):/shared-logs-output logs/shared_logs_output
# - name: Upload Logs
# if: always()
# uses: actions/upload-artifact@v4
# with:
# name: e2e-test-logs
# path: |
# logs/docker
# logs/opensearch_benchmark_logs
# logs/shared_logs_output
# - name: Clean up migrations docker images before caching
# run: |
# docker stop $(docker ps -q) && docker system prune --volumes -f
# docker image ls --format '{{.Repository}}:{{.Tag}}' | grep '^migrations/' | xargs -I {} docker image rm {}

node-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
npm-project:
- ./deployment/cdk/opensearch-service-migration
- ./deployment/migration-assistant-solution
defaults:
run:
working-directory: ${{ matrix.npm-project }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
- name: Install NPM dependencies
run: npm ci
- name: Run CDK Jest Tests (using mocked images)
run: npm run test
# node-tests:
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# npm-project:
# - ./deployment/cdk/opensearch-service-migration
# - ./deployment/migration-assistant-solution
# defaults:
# run:
# working-directory: ${{ matrix.npm-project }}
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: ${{ env.node-version }}
# - name: Install NPM dependencies
# run: npm ci
# - name: Run CDK Jest Tests (using mocked images)
# run: npm run test

link-checker:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -240,9 +240,9 @@ jobs:
- console-python-tests
- workflow-info
runs-on: ubuntu-latest
strategy:
matrix:
iteration: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
# strategy:
# matrix:
# iteration: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
steps:
- name: Download Workflow Info
uses: actions/download-artifact@v4
Expand All @@ -262,17 +262,17 @@ jobs:
path: ./coverage-reports
pattern: coverage-reports-*
- name: Upload coverage report
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@v5.0.5
with:
fail_ci_if_error: true
files: /**/coverage-reports/**/*.*
flags: unittests
override_branch: ${{ env.workflow-info_branch }}
override_commit: ${{ env.workflow-info_commit }}
override_pr: ${{ env.workflow-info_pr_number }}
commit_parent: ${{ env.workflow-info_commit_parent }}
override_build_url: ${{ env.workflow-info_build_url }}
override_build: ${{ env.workflow-info_build }}
# override_branch: ${{ env.workflow-info_branch }}
# override_commit: ${{ env.workflow-info_commit }}
# override_pr: ${{ env.workflow-info_pr_number }}
# commit_parent: ${{ env.workflow-info_commit_parent }}
# override_build_url: ${{ env.workflow-info_build_url }}
# override_build: ${{ env.workflow-info_build }}
verbose: true

all-ci-checks-pass:
Expand Down

0 comments on commit f003574

Please sign in to comment.