Github Actions Java CI #488
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: Github Actions Java CI | |
on: | |
workflow_run: | |
workflows: ["Native CI"] | |
branches: [main] | |
types: | |
- completed | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
java: [21] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: graalvm/setup-graalvm@v1 | |
with: | |
version: 'latest' | |
java-version: ${{ matrix.java }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
distribution: 'graalvm' | |
native-image-job-reports: 'true' | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java }} | |
cache: 'maven' | |
distribution: 'temurin' | |
- name: Run jars and get test results | |
run: ./runGatling.sh | |
- name: Commit the test result | |
run: | | |
curl https://sh.rustup.rs -sSf | sh -s -- -y | |
source $HOME/.cargo/env | |
set -x | |
DATE=$(date +"%Y-%m-%d") | |
git config --global user.email "ozkan.pakdil@gmail.com" | |
git config --global user.name "ozkanpakdil" | |
rm -rf ozkanpakdil.github.io | |
rm -rf page | |
git clone https://${{ secrets.TOKEN_GIT }}@github.com/ozkanpakdil/ozkanpakdil.github.io.git page | |
git config pull.rebase true | |
mv test-result.md page/my_collections/_microservicetests/$DATE-microservice-framework-test-${{ matrix.java }}.markdown | |
cd page/my_collections/_microservicetests/ | |
git add $DATE-microservice-framework-test-${{ matrix.java }}.markdown | |
# ls -1tr | head -n -10 | xargs -d '\n' git rm -f -- | |
git commit -m "Automatic publish from micro frameworks test" | |
git push | |
cd ../../../ | |
rm -rf page | |