2023-05-01 23:31:27 +02:00
|
|
|
name: Lint
|
|
|
|
|
|
|
|
on:
|
|
|
|
# Trigger the workflow on push or pull request,
|
|
|
|
# but only for the main branch
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
run-linters:
|
|
|
|
name: Run linters
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Install Dependencies
|
2023-05-02 01:10:22 +02:00
|
|
|
run: apt update; apt install -y nodejs eslint
|
2023-05-01 23:31:27 +02:00
|
|
|
|
|
|
|
- name: Check out Git repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
2023-05-02 01:10:22 +02:00
|
|
|
- name: Set up Node.js
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: 14
|
|
|
|
|
|
|
|
- name: Install Node.js dependencies
|
2023-05-02 01:11:39 +02:00
|
|
|
run: npm install
|
2023-05-02 01:10:22 +02:00
|
|
|
|
2023-05-02 01:04:01 +02:00
|
|
|
- name: Run eslint
|
|
|
|
run: eslint *.js
|