-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (48 loc) · 1.21 KB
/
scraper-test.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: test-scraper
on:
pull_request:
branches:
- main
- dev
paths:
- 'Scraper/**'
- 'config/**'
push:
branches:
- dev
paths:
- 'Scraper/**'
- 'config/**'
env:
REGISTRY_NAME: serviceregistryjobagggregator
APP_NAME: scraper
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Setup Java
uses: actions/setup-java@v1
with:
distribution: 'temurin'
java-version: 18
cache: maven
- name: Build with Maven
run: mvn clean install package
working-directory: Common
- name: Run tests
run: mvn clean install compile test
working-directory: ./Scraper
- name: Start minikube
uses: medyagh/setup-minikube@master
- name: Build docker image
run: |
export SHELL=/bin/bash
eval $(minikube -p minikube docker-env)
docker build . -t ${{ env.REGISTRY_NAME }}.azurecr.io/${{ env.APP_NAME }} -f Scraper/Dockerfile
- name: Deploy to minikube
run: |
kubectl apply -f configs/k8s/dev/scraper_depl.yaml