-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (40 loc) · 1.42 KB
/
karate.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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