Skip to content

Commit

Permalink
Merge branch 'master' into consumingJSONDecimalFromAvroTopic
Browse files Browse the repository at this point in the history
  • Loading branch information
MateuszDobrowolski committed Oct 29, 2024
2 parents b9773ce + 4180225 commit da6d83a
Show file tree
Hide file tree
Showing 2,090 changed files with 80,964 additions and 83,587 deletions.
45 changes: 45 additions & 0 deletions .github/scripts/check-google-java-format.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash
set -u

script_name=""

case "$(uname -sr)" in

Darwin*)
script_name="google-java-format_darwin-arm64"
;;

Linux*)
script_name="google-java-format_linux-x86-64"
;;
*)
echo 'Unsupported OS'
exit 1
;;
esac

JAVA_FILES=$(find . -name "*.java" -type f)

invalid_files=0

echo "Following files are formatted incorrectly:";
# TODO: remove '--skip-reflowing-long-strings' once https://github.com/google/google-java-format/issues/566 is fixed
for FILE in $JAVA_FILES; do
if [[ "$*" == *--fix* ]]; then
./$script_name --skip-reflowing-long-strings --replace "$FILE" > /dev/null
else
./$script_name --set-exit-if-changed --skip-reflowing-long-strings "$FILE" > /dev/null
fi
if [ $? -ne 0 ]; then
echo "$FILE"
((invalid_files++))
fi
done

if [ "$invalid_files" -ne 0 ]; then
echo "Found $invalid_files incorrectly formatted files (listed above), run google-java-format to fix them.";
exit 1
else
echo "All files are formatted correctly."
fi

41 changes: 0 additions & 41 deletions .github/scripts/download_reports.sh

This file was deleted.

118 changes: 0 additions & 118 deletions .github/scripts/reporter.py

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/checkstyle.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/ci-console.yml

This file was deleted.

100 changes: 88 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,40 @@ name: CI

on:
push:
branches: [ master, integration_tests_framework ]
branches: [ master ]
pull_request:
branches: [ master, integration_tests_framework ]
branches: [ master ]

jobs:
console:
name: ci-console
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./hermes-console
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Run linter
run: yarn && yarn lint
- name: Run frontend tests
run: yarn test:unit
- name: Upload artifact
if: always() && github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v4
with:
name: ci-console
path: ./hermes-console/allure-results
build:
runs-on: ubuntu-latest
strategy:
matrix:
tasks: [
# Add/remove task in Allure Report job also
{alias: "unitTests", name: "check"},
{alias: "integrationTests", name: "integrationTest"},
{alias: "slowIntegrationTests", name: "slowIntegrationTest"},
Expand All @@ -20,22 +44,16 @@ jobs:
fail-fast: false
name: ${{ matrix.tasks.alias }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build with Gradle
run: ./gradlew assemble
- name: Run task with Gradle
Expand All @@ -53,3 +71,61 @@ jobs:
with:
paths: '**/build/test-results/**/TEST-*.xml'
show: fail, skip
- name: Upload artifact
if: always() && github.ref == 'refs/heads/master' && matrix.tasks.alias != 'benchmark'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.tasks.alias }}
path: build/allure-results

allureReport:
if: always() && github.ref == 'refs/heads/master'
name: Generate Allure Report
needs: [ build, console ]
runs-on: ubuntu-latest
steps:
- name: Download artifact unitTests
uses: actions/download-artifact@v4
if: always()
with:
name: unitTests
path: allure-results
- name: Download artifact integrationTests
uses: actions/download-artifact@v4
if: always()
with:
name: integrationTests
path: allure-results
- name: Download artifact slowIntegrationTests
uses: actions/download-artifact@v4
if: always()
with:
name: slowIntegrationTests
path: allure-results
- name: Download artifact ci-console
uses: actions/download-artifact@v4
if: always()
with:
name: ci-console
path: allure-results
- name: Load test report history
uses: actions/checkout@v4
if: always()
continue-on-error: true
with:
ref: gh-pages
path: gh-pages
- name: Build test report
uses: simple-elf/[email protected]
if: always()
with:
gh_pages: gh-pages
allure_history: allure-history
allure_results: allure-results
- name: Publish test report
uses: peaceiris/actions-gh-pages@v4
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: allure-history
Loading

0 comments on commit da6d83a

Please sign in to comment.