-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.92 KB
/
Copy pathsmoke-test.yml
File metadata and controls
61 lines (51 loc) · 1.92 KB
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
61
name: Smoke Test
on:
# Automatic: Run on pending pull requests
pull_request:
branches:
- main
- develop
# Automatic: Run when new commits are pushed to develop or main
push:
paths-ignore:
- '.github/**'
- '.gitignore'
- 'Dockerfile'
- '.dockerignore'
- 'README.md'
branches:
- main
- develop
# Manual: Allow user to manually request this via GitHub UI
workflow_dispatch:
jobs:
smoke-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.9'
- name: Install Python dependencies
run: pip install --user -r requirements.txt
- uses: helm/kind-action@v1
name: Create kind cluster
with:
config: .kind.with.hostpath.yml
- name: Setup environment
run: |
cat env/backend.json | sed -e 's#"uri": "mongodb://workbench:workbench@workbench-mongodb-svc.workbench.svc.cluster.local:27017/ndslabs?authSource=admin",#"uri": "mongodb://workbench:workbench@localhost:27017/ndslabs?authSource=admin",#' > env/backend.json
cat env/backend.json
- name: Run MongoDB in the background
run: |
kubectl create ns workbench
kubectl run workbench-mongodb-svc -n workbench --image=mongo --restart=Never --expose --port=27017
kubectl port-forward svc/workbench-mongodb-svc -n workbench 27017:27017 &
- name: Run Workbench API server, test API connections
run: |
cat env/backend.json
python ./server.py &
curl --fail --insecure http://localhost:5000/api/v1/version
curl --fail --insecure http://localhost:5000/backend.json
curl --fail --insecure http://localhost:5000/frontend.json
curl --fail --insecure http://localhost:5000/api/v1/services