1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/.github/workflows/test.yml
Jari Kolehmainen 55e2355b93 test
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2021-08-30 16:48:38 +03:00

96 lines
3.0 KiB
YAML

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: [14.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
# name: Run Linux integration tests
# if: runner.os == 'Linux'
# - run: make integration
# name: Run integration tests
# shell: bash
# if: runner.os != 'Linux'
- run: npm install -g node-gyp && make build
name: Test build (arm64)
shell: bash
env:
BINARY_ARCH: arm64
if: runner.os == 'macOS'