mirror of
https://github.com/edu4rdshl/Strata.git
synced 2026-07-17 23:24:46 +00:00
ci: add ESLint workflow
This commit is contained in:
parent
bb792cee95
commit
c9f3b6b1ad
2 changed files with 43 additions and 3 deletions
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
|
@ -15,7 +15,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -28,7 +28,7 @@ jobs:
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
|
|
||||||
- name: Cache cargo registry
|
- name: Cache cargo registry
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v6
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/registry
|
~/.cargo/registry
|
||||||
|
|
@ -54,7 +54,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: Install glib-compile-schemas
|
- name: Install glib-compile-schemas
|
||||||
run: sudo apt-get update -q && sudo apt-get install -y libglib2.0-bin
|
run: sudo apt-get update -q && sudo apt-get install -y libglib2.0-bin
|
||||||
|
|
|
||||||
40
.github/workflows/eslint.yml
vendored
Normal file
40
.github/workflows/eslint.yml
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
name: ESLint
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ 'main' ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ 'main' ]
|
||||||
|
schedule:
|
||||||
|
- cron: '33 14 * * 5'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
eslint:
|
||||||
|
name: Run eslint scanning
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
# Required for private repositories by github/codeql-action/upload-sarif
|
||||||
|
actions: read
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: |
|
||||||
|
npm install eslint@^10.0.0 @eslint/js@^10.0.0
|
||||||
|
npm install @microsoft/eslint-formatter-sarif@2.1.7
|
||||||
|
|
||||||
|
- name: Lint
|
||||||
|
run: >
|
||||||
|
npx eslint .
|
||||||
|
--format @microsoft/eslint-formatter-sarif
|
||||||
|
--output-file eslint-results.sarif
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Report
|
||||||
|
uses: github/codeql-action/upload-sarif@v4
|
||||||
|
with:
|
||||||
|
sarif_file: eslint-results.sarif
|
||||||
|
wait-for-processing: true
|
||||||
Loading…
Add table
Add a link
Reference in a new issue