1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Test using GH Actions (#2509)

* test on gh actions

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>

* don't run integration test on release pipeline

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2021-04-12 15:43:45 +03:00 committed by GitHub
parent 743597e2f5
commit ed8d26fe68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 72 additions and 42 deletions

View File

@ -1,19 +1,7 @@
variables:
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
pr:
branches:
include:
- master
- releases/*
paths:
exclude:
- .github/*
- docs/*
- mkdocs/*
pr: none
trigger:
branches:
include:
- '*'
tags:
include:
- "*"
@ -57,12 +45,6 @@ jobs:
displayName: Run tests
- script: make test-extensions
displayName: Run In-tree Extension tests
- bash: |
set -e
rm -rf extensions/telemetry
make integration-win
git checkout extensions/telemetry
displayName: Run integration tests
- script: make build
condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))"
displayName: Build
@ -102,14 +84,6 @@ jobs:
displayName: Run tests
- script: make test-extensions
displayName: Run In-tree Extension tests
- bash: |
set -e
rm -rf extensions/telemetry
make integration-mac
git checkout extensions/telemetry
displayName: Run integration tests
- script: make test-extensions
displayName: Run In-tree Extension tests
- script: make build
condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))"
displayName: Build
@ -151,21 +125,6 @@ jobs:
displayName: Run tests
- script: make test-extensions
displayName: Run In-tree Extension tests
- bash: |
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
displayName: Install integration test dependencies
- bash: |
set -e
rm -rf extensions/telemetry
xvfb-run --auto-servernum --server-args='-screen 0, 1600x900x24' make integration-linux
git checkout extensions/telemetry
displayName: Run integration tests
- bash: |
sudo chown root:root /
sudo apt-get update && sudo apt-get install -y snapd

71
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,71 @@
name: Test
on:
- pull_request
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 }}
- 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'