Checking format #972
Workflow file for this run
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: Check format | |
run-name: Checking format | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
install: | |
name: "Install" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout files | |
uses: actions/checkout@v3 | |
- name: Install node_modules | |
# This action does not work very well with subdirectories out of the box, | |
# but we can use this workaround to make it work. | |
# Note that this is highly dependent on the version of the action used | |
uses: OffchainLabs/actions/node-modules/install@35a1f8c3f3ad803e1fd9b81b94d063a4fc90a030 | |
with: | |
install-command: cd website && yarn install --frozen-lockfile | |
cache-key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
check-formatting: | |
name: "Check Formatting" | |
runs-on: ubuntu-latest | |
needs: install | |
steps: | |
- name: Checkout files | |
uses: actions/checkout@v3 | |
- name: Restore node_modules | |
# This action does not work very well with subdirectories out of the box, | |
# but we can use this workaround to make it work. | |
# Note that this is highly dependent on the version of the action used | |
uses: OffchainLabs/actions/node-modules/restore@35a1f8c3f3ad803e1fd9b81b94d063a4fc90a030 | |
with: | |
cache-key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Check formatting with Prettier | |
working-directory: ./website | |
run: yarn format:check |