mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 05:01:43 +00:00
Add CI step: lint
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
parent
d9f1d73faa
commit
1977725957
12
.github/actions/lint/action.yaml
vendored
Normal file
12
.github/actions/lint/action.yaml
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
name: Run Lint
|
||||||
|
description: Run Lint
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: 'composite'
|
||||||
|
steps:
|
||||||
|
- name: Setup env
|
||||||
|
uses: ./.github/actions/setup
|
||||||
|
|
||||||
|
- name: Run linters
|
||||||
|
shell: bash
|
||||||
|
run: yarn lint
|
||||||
14
.github/actions/setup/action.yaml
vendored
Normal file
14
.github/actions/setup/action.yaml
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
name: Setup UI Env
|
||||||
|
description: Setup node and install dependencies
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: 'composite'
|
||||||
|
steps:
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: '.nvmrc'
|
||||||
|
cache: 'yarn'
|
||||||
|
|
||||||
|
- name: Install packages
|
||||||
|
shell: bash
|
||||||
|
run: yarn install
|
||||||
11
.github/workflows/build-extension-charts.yml
vendored
11
.github/workflows/build-extension-charts.yml
vendored
@ -11,7 +11,18 @@ defaults:
|
|||||||
working-directory: ./
|
working-directory: ./
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
uses: ./.github/actions/lint
|
||||||
build-extension-charts:
|
build-extension-charts:
|
||||||
|
needs:
|
||||||
|
- lint
|
||||||
uses: rancher/dashboard/.github/workflows/build-extension-charts.yml@master
|
uses: rancher/dashboard/.github/workflows/build-extension-charts.yml@master
|
||||||
permissions:
|
permissions:
|
||||||
actions: write
|
actions: write
|
||||||
|
|||||||
21
.github/workflows/test.yaml
vendored
Normal file
21
.github/workflows/test.yaml
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
name: Tests
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- 'release-*'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- 'release-*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
uses: ./.github/actions/lint
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,6 +1,3 @@
|
|||||||
dev
|
|
||||||
lint
|
|
||||||
|
|
||||||
# rancher shell
|
# rancher shell
|
||||||
.shell
|
.shell
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user