-
-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (41 loc) · 1.34 KB
/
k8s-action.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
41
42
43
name: run k8s in a github action?
on:
workflow_dispatch:
pull_request:
branches:
- develop
jobs:
execute:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Task
uses: arduino/setup-task@v2
- run: task setup-local-env
- name: setup k8s
uses: helm/[email protected]
- name: Verify k8s
run: |
kubectl cluster-info
kubectl get nodes
- name: deploy
run: |
kubectl create namespace languagedepot
kubectl apply -k ./deployment/gha
kubectl wait --for=condition=Ready --timeout=90s pod -l 'app in (lexbox, ui, hg, db)' -n languagedepot
- name: status
if: failure()
run: |
kubectl describe pods -l 'app in (lexbox, ui, hg, db)' -n languagedepot
echo "========== LOGS =========="
kubectl logs -l 'app in (lexbox, ui, hg, db)' -n languagedepot --prefix --all-containers --tail=50
- name: test
env:
TEST_SERVER_HOSTNAME: 'localhost'
TEST_STANDARD_HG_HOSTNAME: 'hg.localhost'
TEST_RESUMABLE_HG_HOSTNAME: 'resumable.localhost'
TEST_PROJECT_CODE: 'sena-3'
TEST_DEFAULT_PASSWORD: 'pass'
run: dotnet test --logger GitHubActions --filter Category=Integration