mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Simplify the matrix
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
6f5a0284d5
commit
7711c57da8
77
.github/workflows/test.yml
vendored
77
.github/workflows/test.yml
vendored
@ -7,13 +7,14 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
jobs:
|
jobs:
|
||||||
smoke:
|
test:
|
||||||
name: Run Smoke Tests
|
name: Run '${{ matrix.type }}' Tests
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-20.04, macos-11, windows-2019]
|
os: [ubuntu-20.04, macos-11, windows-2019]
|
||||||
|
type: [unit, smoke]
|
||||||
node-version: [16.x]
|
node-version: [16.x]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Release from lens
|
- name: Checkout Release from lens
|
||||||
@ -62,12 +63,24 @@ jobs:
|
|||||||
retry_on: error
|
retry_on: error
|
||||||
command: make -j2 build-extensions
|
command: make -j2 build-extensions
|
||||||
|
|
||||||
|
- run: make test
|
||||||
|
name: Run tests
|
||||||
|
if: ${{ matrix.type === "unit" }}
|
||||||
|
|
||||||
|
- run: make test-extensions
|
||||||
|
name: Run In-tree Extension tests
|
||||||
|
if: ${{ matrix.type === "unit" }}
|
||||||
|
|
||||||
|
- run: make ci-validate-dev
|
||||||
|
if: ${{ contains(github.event.pull_request.labels.*.name, 'dependencies') && matrix.type === "unit" }}
|
||||||
|
name: Validate dev mode will work
|
||||||
|
|
||||||
- name: Install integration test dependencies
|
- name: Install integration test dependencies
|
||||||
id: minikube
|
id: minikube
|
||||||
uses: medyagh/setup-minikube@master
|
uses: medyagh/setup-minikube@master
|
||||||
with:
|
with:
|
||||||
minikube-version: latest
|
minikube-version: latest
|
||||||
if: runner.os == 'Linux'
|
if: ${{ runner.os == 'Linux' && matrix.type === "smoke" }}
|
||||||
|
|
||||||
- run: xvfb-run --auto-servernum --server-args='-screen 0, 1600x900x24' make integration
|
- run: xvfb-run --auto-servernum --server-args='-screen 0, 1600x900x24' make integration
|
||||||
name: Run Linux integration tests
|
name: Run Linux integration tests
|
||||||
@ -78,65 +91,11 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
ELECTRON_BUILDER_EXTRA_ARGS: "--x64 --arm64"
|
ELECTRON_BUILDER_EXTRA_ARGS: "--x64 --arm64"
|
||||||
if: runner.os == 'macOS'
|
if: ${{ runner.os == 'macOS' && matrix.type === "smoke" }}
|
||||||
|
|
||||||
- run: make integration
|
- run: make integration
|
||||||
name: Run Windows integration tests
|
name: Run Windows integration tests
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
ELECTRON_BUILDER_EXTRA_ARGS: "--x64 --ia32"
|
ELECTRON_BUILDER_EXTRA_ARGS: "--x64 --ia32"
|
||||||
if: runner.os == 'Windows'
|
if: ${{ runner.os == 'Windows' && matrix.type === "smoke" }}
|
||||||
|
|
||||||
unit:
|
|
||||||
name: Run Unit Tests
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-20.04, macos-11, windows-2019]
|
|
||||||
node-version: [16.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-fields/retry@v2
|
|
||||||
name: Install dependencies
|
|
||||||
with:
|
|
||||||
timeout_minutes: 10
|
|
||||||
max_attempts: 3
|
|
||||||
retry_on: error
|
|
||||||
command: make node_modules
|
|
||||||
|
|
||||||
- run: make test
|
|
||||||
name: Run tests
|
|
||||||
|
|
||||||
- run: make test-extensions
|
|
||||||
name: Run In-tree Extension tests
|
|
||||||
|
|
||||||
- run: make ci-validate-dev
|
|
||||||
if: contains(github.event.pull_request.labels.*.name, 'dependencies')
|
|
||||||
name: Validate dev mode will work
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user