Add CI step: lint

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
Francesco Torchia 2024-11-05 10:59:07 +01:00
parent d9f1d73faa
commit 1977725957
No known key found for this signature in database
GPG Key ID: E6D011B7415D4393
5 changed files with 58 additions and 3 deletions

12
.github/actions/lint/action.yaml vendored Normal file
View 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
View 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

View File

@ -11,7 +11,18 @@ defaults:
working-directory: ./
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:
needs:
- lint
uses: rancher/dashboard/.github/workflows/build-extension-charts.yml@master
permissions:
actions: write

21
.github/workflows/test.yaml vendored Normal file
View 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
View File

@ -1,6 +1,3 @@
dev
lint
# rancher shell
.shell