-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (56 loc) · 2.21 KB
/
ci-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
57
58
59
60
name: CI test build
on:
push:
branches:
- test
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.101
- name: Build
run: dotnet build --configuration Release
- name: Test
run: dotnet test --no-build --configuration Release
- name: Publish API
run: dotnet publish --no-build ./src/Lykke.Service.MarketProfile/Lykke.Service.MarketProfile.csproj --output ./publish-api --configuration Release
- name: Publish worker
run: dotnet publish --no-build ./src/Lykke.Job.MarketProfile/Lykke.Job.MarketProfile.csproj --output ./publish-worker --configuration Release
- name: Check API dir
run: ls ./publish-api
- name: Check worker dir
run: ls ./publish-worker
- name: Publish API to Registry
uses: swisschain/Publish-Docker-Github-Action@master
with:
name: swisschains/antares-market-profile-api:test
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
workdir: ./publish-api
# snapshot: true # use snapshot to push an additional image, which is tagged with {YEAR}{MONTH}{DAY}{HOUR}{MINUTE}{SECOND}{first 6 digits of the git sha}
tag_names: true
- name: Publish worker to Registry
uses: swisschain/Publish-Docker-Github-Action@master
with:
name: swisschains/antares-market-profile-job:test
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
workdir: ./publish-worker
# snapshot: true # use snapshot to push an additional image, which is tagged with {YEAR}{MONTH}{DAY}{HOUR}{MINUTE}{SECOND}{first 6 digits of the git sha}
tag_names: true
- name: Restart service
uses: swisschain/kube-restart-pods@master
env:
KUBE_CONFIG_DATA: ${{ secrets.LYKKE_TEST_KUBE_CONFIG_DATA }}
NAMESPACE: services
POD: market-profile
- name: Restart job
uses: swisschain/kube-restart-pods@master
env:
KUBE_CONFIG_DATA: ${{ secrets.LYKKE_TEST_KUBE_CONFIG_DATA }}
NAMESPACE: lykke-jobs
POD: market-profile