forked from lensapp/lens
-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (79 loc) · 2.84 KB
/
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Test
on:
pull_request:
branches:
- "*"
push:
branches:
- master
jobs:
build:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-16.04, macos-10.15, windows-2019]
node-version: [12.x]
steps:
- name: Checkout Release from lens
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Add the current IP address, long hostname and short hostname record to /etc/hosts file
if: runner.os == 'Linux'
run: |
echo -e "$(ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1)\t$(hostname -f) $(hostname -s)" | sudo tee -a /etc/hosts
- name: Using Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: nick-invision/retry@v2
name: Install dependencies
with:
timeout_minutes: 10
max_attempts: 3
retry_on: error
command: make node_modules
- run: make build-npm
name: Generate npm package
- uses: nick-invision/retry@v2
name: Build bundled extensions
with:
timeout_minutes: 15
max_attempts: 3
retry_on: error
command: make -j2 build-extensions
- run: make test
name: Run tests
- run: make test-extensions
name: Run In-tree Extension tests
- run: |
sudo apt-get update
sudo apt-get install libgconf-2-4 conntrack -y
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
sudo minikube start --driver=none
# Although the kube and minikube config files are in placed $HOME they are owned by root
sudo chown -R $USER $HOME/.kube $HOME/.minikube
name: Install integration test dependencies
if: runner.os == 'Linux'
- run: xvfb-run --auto-servernum --server-args='-screen 0, 1600x900x24' make integration-linux
name: Run Linux integration tests
if: runner.os == 'Linux'
- run: make integration-win
name: Run Windows integration tests
shell: bash
if: runner.os == 'Windows'
- run: make integration-mac
name: Run macOS integration tests
if: runner.os == 'macOS'