2021-04-12 15:43:45 +03:00
|
|
|
name: Test
|
|
|
|
on:
|
2021-04-15 14:40:49 +03:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- "*"
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2021-04-12 15:43:45 +03:00
|
|
|
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: Using Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
|
2021-04-13 12:26:36 +03:00
|
|
|
- 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-
|
|
|
|
|
2021-04-12 15:43:45 +03:00
|
|
|
- run: make node_modules
|
|
|
|
name: Install dependencies
|
|
|
|
|
|
|
|
- run: make build-npm
|
|
|
|
name: Generate npm package
|
|
|
|
|
|
|
|
- run: make -j2 build-extensions
|
|
|
|
name: Build bundled 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: |
|
|
|
|
set -e
|
|
|
|
rm -rf extensions/telemetry
|
|
|
|
xvfb-run --auto-servernum --server-args='-screen 0, 1600x900x24' make integration-linux
|
|
|
|
git checkout extensions/telemetry
|
|
|
|
name: Run Linux integration tests
|
|
|
|
if: runner.os == 'Linux'
|
|
|
|
|
|
|
|
- run: |
|
|
|
|
set -e
|
|
|
|
rm -rf extensions/telemetry
|
|
|
|
make integration-win
|
|
|
|
git checkout extensions/telemetry
|
|
|
|
name: Run Windows integration tests
|
|
|
|
shell: bash
|
|
|
|
if: runner.os == 'Windows'
|
|
|
|
|
|
|
|
- run: |
|
|
|
|
set -e
|
|
|
|
rm -rf extensions/telemetry
|
|
|
|
make integration-mac
|
|
|
|
git checkout extensions/telemetry
|
|
|
|
name: Run macOS integration tests
|
|
|
|
if: runner.os == 'macOS'
|