Skip to content

chore(sonar): configure sonar #3844

chore(sonar): configure sonar

chore(sonar): configure sonar #3844

Workflow file for this run

name: Run karate testing on push
on: push
jobs:
karate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- name: Run karate tests
run: |
cd yaki_docker
echo "Creating .env file"
echo ${{ secrets.ENV_FILE_KARATE }} | base64 -d > .env
cd ../yaki_backend
echo "Creating .env file"
echo ${{ secrets.ENV_FILE_KARATE }} | base64 -d > .env
echo "Install dependencies"
npm i
echo "Generate swagger.json file"
npm run swagger
echo "build java"
cd ../yaki_admin_backend
echo ${{ secrets.APPLICATION_PROPERTIES }} | base64 -d > src/main/resources/application.properties
echo ${{ secrets.APPLICATION_TEST_PROPERTIES }} | base64 -d > src/test/resources/application-test.properties
gradle clean build
echo "Starting docker containers"
cd ../yaki_docker
docker compose up --build --quiet-pull -d
echo "Sleep 10s to wait backend admin initialization"
sleep 10s
cd ../yaki_karate
echo ${{ secrets.KARATE_CONFIG }} | base64 -d > .env
echo "Running karate tests"
mvn test --quiet
cd ../yaki_docker
echo "Stopping docker containers"
docker compose down