mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
add lint job
This commit is contained in:
37
.github/workflows/common.yaml
vendored
Normal file
37
.github/workflows/common.yaml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Lint
|
||||
push:
|
||||
branches:
|
||||
- '**' # matches every branch
|
||||
branches-ignore:
|
||||
- 'hotfix-*' # excludes hotfix branches
|
||||
jobs:
|
||||
Explore-GitHub-Actions:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: apt-get update
|
||||
- run: apt-get install -y curl gcc
|
||||
- run: apt-get install -y build-essential
|
||||
- run: curl -sL https://deb.nodesource.com/setup_12.x | -E bash -
|
||||
- run: apt-get install -y nodejs
|
||||
- run: npm ci
|
||||
- run: npm run lint
|
||||
- run: chmod +x ./ci/scripts/cleanup.sh
|
||||
- run: ./ci/scripts/cleanup.sh
|
||||
|
||||
# Run lint all projects
|
||||
lint-projects:
|
||||
stage: BuildAndTest
|
||||
script:
|
||||
- apt-get update
|
||||
- apt-get install -y curl gcc
|
||||
- apt-get install -y build-essential
|
||||
- curl -sL https://deb.nodesource.com/setup_12.x | -E bash -
|
||||
- apt-get install -y nodejs
|
||||
- npm ci
|
||||
- npm run lint
|
||||
- chmod +x ./ci/scripts/cleanup.sh
|
||||
- ./ci/scripts/cleanup.sh
|
||||
except:
|
||||
refs:
|
||||
- hotfix-master
|
||||
- hotfix-release
|
||||
Reference in New Issue
Block a user