-
Notifications
You must be signed in to change notification settings - Fork 19
67 lines (64 loc) · 2.45 KB
/
end_to_end_test.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: End to end tests
on:
workflow_call:
inputs:
test-runner:
required: true
workflow_dispatch:
inputs:
test-runner:
required: true
jobs:
e2e-test:
name: end to end test
runs-on: [self-hosted, linux, x64, ${{ test-runner }}]
steps:
- name: Echo hello world
run: echo "hello world"
- name: File permission for /usr/local/bin
run: ls -ld /usr/local/bin | grep drwxrwxrwx
- name: Test file permission for /usr/local/bin
run: touch /usr/local/bin/test_file
# "Install microk8s" step will test if the proxies settings are correct.
- name: Proxy set in /etc/environment
run: cat /etc/environment | grep HTTP_PROXY
# "Update apt in python docker container" step will test docker default proxy settings due to
# pulling the python image.
- name: Proxy set in docker daemon
run: sudo cat /etc/systemd/system/docker.service.d/http-proxy.conf | grep HTTP_PROXY
# "Update apt in python docker container" step will test docker client default proxy settings.
- name: Proxy set in docker client
run: cat /home/ubuntu/.docker/config.json | grep httpProxy
- name: Install microk8s
run: sudo snap install microk8s --classic
- name: Wait for microk8s
run: sudo microk8s status --wait-ready
- name: Deploy nginx for testing
run: sudo microk8s kubectl create deployment nginx --image=nginx
- name: Wait for nginx to be ready
run: sudo microk8s kubectl rollout status deployment/nginx --timeout=30m
- name: Update apt in python docker container
run: docker run python:3.10-slim apt update
dep-test:
# Test the dependencies in one job to avoid using too many runners at once.
name: dependency test
needs: e2e-test
runs-on: [self-hosted, linux, x64, e2e-runner]
steps:
- name: Docker version
run: docker version
- name: pip version
run: python3 -m pip --version
- name: npm version
run: npm --version
- name: shellcheck version
run: shellcheck --version
- name: jq version
run: jq --version
- name: yq version
run: yq --version
- name: install check-jsonschema
run: python3 -m pip install check-jsonschema
# Test program installed by pip. The directory `~/.local/bin` need to be added to PATH.
- name: test check-jsonschema
run: check-jsonschema --version