mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-12-24 13:57:27 -05:00
66 lines
1.3 KiB
YAML
66 lines
1.3 KiB
YAML
name: Coding Style
|
|
on: [pull_request, workflow_dispatch]
|
|
|
|
jobs:
|
|
back:
|
|
name: "Lint Back"
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: ./back
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Check coding style
|
|
run: |
|
|
dotnet tool restore
|
|
dotnet csharpier . --check
|
|
|
|
front:
|
|
name: "Lint Front"
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: ./front
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 18.x
|
|
cache: yarn
|
|
cache-dependency-path: front/yarn.lock
|
|
|
|
- name: Install dependencies
|
|
run: yarn install --immutable
|
|
|
|
- name: Lint
|
|
run: yarn lint && yarn format
|
|
|
|
scanner:
|
|
name: "Lint scanner"
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: ./scanner
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Run black
|
|
run: |
|
|
pip3 install black-with-tabs
|
|
black . --check
|
|
|
|
transcoder:
|
|
name: "Lint transcoder"
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: ./transcoder
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Run go fmt
|
|
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
|