-
Notifications
You must be signed in to change notification settings - Fork 2
31 lines (28 loc) · 1.03 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Maven compile backend
run: cd backend; mvn package
- name: install node dependencies
if: always()
run: make node_modules
- name: Check CSS Formatting
if: always()
run: node_modules/prettier/bin-prettier.js -c 'frontend/src/**/*.css'
- name: Validate JavaScript
if: always()
run: node_modules/eslint/bin/eslint.js 'frontend/src/**/*.js'
- name: Check JavaScript Formatting
if: always()
run: node_modules/prettier/bin-prettier.js -c 'frontend/src/**/*.js'
- name: Check Java Formatting
if: always()
# See https://stackoverflow.com/a/21282167
run: diff -u <(find . -type f -name *.java -exec cat {} \;) <(find . -type f -name *.java -exec node_modules/clang-format/bin/linux_x64/clang-format --style=Google {} \;)
- name: Notify on failure
if: failure()
run: echo 'run "make validate" and "make pretty" to see/fix errors locally'