Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CI #22

Merged
merged 4 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 54 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,55 @@
---
name: CI
on:
pull_request:
branches: ['main']
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'npm'
- run: npm ci
- run: npm run build
- run: cd example && npm ci
- name: Lint Code Base
uses: github/super-linter/slim@v5
env:
DISABLE_V8_COMPILE_CACHE: true
DEFAULT_BRANCH: 'main'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.cjs
LINTER_RULES_PATH: /
TYPESCRIPT_ES_CONFIG_FILE: .eslintrc.cjs
CSS_FILE_NAME: stylelint.config.cjs
VALIDATE_ALL_CODEBASE: false
VALIDATE_JAVASCRIPT_STANDARD: false
VALIDATE_JSCPD: false
VALIDATE_JSX: false
VALIDATE_TSX: false
VALIDATE_TYPESCRIPT_STANDARD: false
name: CI
on:
pull_request:
branches: ['main']
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Build Diamond
run: npm run build
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'npm'
- name: Install Dependencies
run: npm ci && cd example && npm ci
- name: Lint Code Base
uses: github/super-linter/slim@v5
env:
DISABLE_V8_COMPILE_CACHE: true
DEFAULT_BRANCH: 'main'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.cjs
LINTER_RULES_PATH: /
TYPESCRIPT_ES_CONFIG_FILE: .eslintrc.cjs
CSS_FILE_NAME: stylelint.config.cjs
VALIDATE_ALL_CODEBASE: false
VALIDATE_JAVASCRIPT_STANDARD: false
VALIDATE_JSCPD: false
VALIDATE_JSX: false
VALIDATE_TSX: false
VALIDATE_TYPESCRIPT_STANDARD: false
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{

Check warning on line 1 in .vscode/settings.json

View workflow job for this annotation

GitHub Actions / lint

File ignored by default.
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.fixAll.stylelint": "explicit"
},
"sonarlint.connectedMode.project": {
"connectionId": "etchteam",
"projectKey": "etchteam_diamond-ui"
}
}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# Diamond UI

[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=etchteam_diamond-ui&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=etchteam_diamond-ui)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=etchteam_diamond-ui&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=etchteam_diamond-ui)
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=etchteam_diamond-ui&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=etchteam_diamond-ui)
Loading