1- name : Run Tests
1+ name : 🎳 Run Tests
22
33on :
44 push :
@@ -10,45 +10,61 @@ jobs:
1010 test :
1111 runs-on : ubuntu-latest
1212 steps :
13- - name : Checkout
13+ - name : 📥 Checkout
1414 uses : actions/checkout@v3
1515
16- - name : Setup JDK 18
16+ - name : 🔌 Setup JDK 18
1717 uses : actions/setup-java@v3
1818 with :
1919 java-version : ' 18'
2020 distribution : ' temurin'
2121 cache : maven
2222
23- - name : Build
23+ - name : 🔨 Build
2424 run : |
2525 mvn --batch-mode --update-snapshots clean package -DskipTests
2626
27- - name : Test
27+ - name : ⬇️ Download test data
28+ uses :
keithweaver/[email protected] 29+ with :
30+ command : cp
31+ source : ${{ secrets.AWS_S3_BUCKET }}
32+ destination : /data/rewards-calculation-test-data
33+ aws_access_key_id : ${{ secrets.AWS_ACCESS_KEY_ID }}
34+ aws_secret_access_key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
35+ aws_region : ${{ secrets.AWS_REGION }}
36+ flags : --recursive
37+
38+ - name : 🍀 Generate .env file
39+ run : |
40+ echo "SPRING_PROFILES_ACTIVE=ci" >> src/test/resources/.env
41+ echo "JSON_DATA_SOURCE_FOLDER=/data/rewards-calculation-test-data" >> src/test/resources/.env
42+
43+ - name : 🎳 Test
2844 run : |
2945 mvn --batch-mode --update-snapshots test
3046
31- - name : Publish coverage report to GitHub Pages
47+ - name : 📊️ Publish coverage report to GitHub Pages
3248 uses : JamesIves/github-pages-deploy-action@v4
3349 if : github.ref == 'refs/heads/main'
3450 with :
3551 BRANCH : gh-pages
3652 folder : target/site/jacoco
3753 target-folder : coverage-report/
3854
39- - name : Generate JaCoCo Badge
55+ - name : ✅ Generate JaCoCo Badge
4056 uses : cicirello/jacoco-badge-generator@v2
4157 if : github.ref == 'refs/heads/main'
4258 with :
4359 generate-branches-badge : true
4460 badges-directory : build/reports/jacoco/test/html/badges
4561
46- - name : Log coverage percentage
62+ - name : 💾 Log coverage percentage
4763 run : |
4864 echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
4965 echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
5066
51- - name : Publish coverage report to GitHub Pages
67+ - name : 📤 Publish coverage report to GitHub Pages
5268 uses : JamesIves/github-pages-deploy-action@v4
5369 if : github.ref == 'refs/heads/main'
5470 with :
0 commit comments