Skip to content

Commit

Permalink
Add CI step: lint
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Torchia <[email protected]>
  • Loading branch information
torchiaf committed Nov 5, 2024
1 parent b4b6af8 commit 7916e44
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .github/actions/lint/action.yaml
Original file line number Diff line number Diff line change
@@ -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 changes: 14 additions & 0 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
@@ -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 changes: 11 additions & 0 deletions .github/workflows/build-extension-charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -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 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
dev
lint

# rancher shell
.shell

Expand Down

0 comments on commit 7916e44

Please sign in to comment.