add prettier and have it format all fleet application code (#625)

* add prettier and have it format all js code except website:
:

* trying running prettier check in CI

* fix runs on in CI

* change CI job name

* fix prettier erros and fix CI
This commit is contained in:
Gabe Hernandez
2021-04-12 14:32:25 +01:00
committed by GitHub
parent df5fa7f515
commit efb35b537a
631 changed files with 31167 additions and 29930 deletions
+34 -9
View File
@@ -25,18 +25,18 @@ jobs:
${{ runner.os }}-modules-
# It seems faster not to cache Go dependencies
- name: Install JS Dependencies
run: make deps-js
- name: Install Go Dependencies
run: make deps-go
# Pre-starting dependencies here means they are ready to go when we need them.
# Pre-starting dependencies here means they are ready to go when we need them.
- name: Start Infra Dependencies
# Use & to background this
run: docker-compose up -d mysql_test redis mailhog saml_idp &
- name: Build Fleet
run: |
export PATH=$PATH:~/go/bin
@@ -51,7 +51,7 @@ jobs:
make e2e-setup
yarn cypress run --config video=false
test-js:
strategy:
matrix:
@@ -106,7 +106,33 @@ jobs:
- name: Run JS Linting
run: |
make lint-js
check-prettier:
strategy:
matrix:
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: JS Dependency Cache
uses: actions/cache@v2
with:
path: |
**/node_modules
~/.cache/Cypress
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- name: Install JS Dependencies
run: make deps-js
- name: Run prettier formatting check
run: |
yarn prettier:check
test-go:
strategy:
@@ -122,15 +148,15 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v2
# Pre-starting dependencies here means they are ready to go when we need them.
# Pre-starting dependencies here means they are ready to go when we need them.
- name: Start Infra Dependencies
# Use & to background this
run: docker-compose up -d mysql_test redis &
# It seems faster not to cache Go dependencies
- name: Install Go Dependencies
run: make deps-go
- name: Generate static files
run: |
export PATH=$PATH:~/go/bin
@@ -158,4 +184,3 @@ jobs:
- name: Run Go Linting
run: |
make lint-go