Fix prettier #106
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Checks | |
on: | |
push: | |
paths: | |
# rerun when typescript files change | |
- "ts/**" | |
# rerun when theme files change | |
- "themes/gruvbox/**" | |
- "themes/dracula/**" | |
# rerun when workflow is changed | |
- ".github/workflows/check.yml" | |
# rerun when packages change | |
- "package.json" | |
- "package-lock.json" | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
typescript: | |
name: Type-Check node ${{ matrix.node }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [ 18 ] | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- | |
name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: npm | |
- | |
name: Install npm dependencies | |
run: npm install | |
- | |
name: Run Typescript Compiler | |
run: npm run type-check | |
eslint: | |
name: ESLint node ${{ matrix.node }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [ 18 ] | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- | |
name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: npm | |
- | |
name: Install npm dependencies | |
run: npm install | |
- | |
name: Run ESLint | |
run: npm run lint | |
prettier: | |
name: Prettier node ${{ matrix.node }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [ 18 ] | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- | |
name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: npm | |
- | |
name: Install npm dependencies | |
run: npm install | |
- | |
name: Run Prettier | |
run: npm run prettier | |
package-lock: | |
name: package-lock.json node ${{ matrix.node }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [ 18 ] | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- | |
name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: npm | |
- | |
name: Install npm dependencies | |
run: npm install | |
- | |
name: Check package-lock.json is unchanged | |
# Fail if package-lock.json is changed when installing packages, | |
# indicating that it wasn't updated when packages were last changed | |
run: git diff --exit-code --color HEAD -- package-lock.json |