Repository navigation
Bump org.apache.maven:apache-maven from 3.9.9 to 3.9.16 #53
Workflow file for this run
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
| name: JavaCrypt Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| java: [11, 17, 21, 25] | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v7 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v5.7.0 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java }} | |
| cache: 'maven' | |
| - name: Build with Maven | |
| run: ./mvnw -B package | |
| - name: Start Tool | |
| run: java -jar target/JavaCrypt.jar | |
| - name: Generate Keys | |
| run: java -jar target/JavaCrypt.jar -genkeys priv.key pub.key | |
| - name: create Test (clear) File | |
| run: | | |
| crypt_file="weather_report.txt" | |
| if [ ! -e "$crypt_file" ]; then | |
| echo "Dear readers, today's weather is best described as a blend of unpleasant dampness and ominous clouds." > "$crypt_file" | |
| else | |
| exit 1 | |
| fi | |
| touch encrypt.txt | |
| touch decrypt.txt | |
| - name: encrypt file | |
| run: java -jar target/JavaCrypt.jar -encrypt pub.key weather_report.txt encrypt.txt | |
| - name: decrypt file | |
| run: java -jar target/JavaCrypt.jar -decrypt priv.key encrypt.txt decrypt.txt | |
| - name: compare files | |
| run: | | |
| datei1="decrypt.txt" | |
| datei2="weather_report.txt" | |
| cat $datei1 | |
| cat $datei2 | |
| if [ -e "$datei1" ] && [ -e "$datei2" ]; then | |
| if ! cmp -s "$datei1" "$datei2"; then | |
| exit 1 | |
| fi | |
| fi | |
| - name: Clean Up | |
| run: | | |
| rm -rf *.key | |
| rm -rf *.txt | |
| git clean -fX |