Run prettier on GitHub workflows

This commit is contained in:
Franck Royer 2022-05-02 16:32:56 +10:00
parent 5377bd6371
commit 882ddac94e
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
3 changed files with 21 additions and 14 deletions

View File

@ -3,16 +3,16 @@ name: CI
on: on:
push: push:
branches: branches:
- 'master' - "master"
- 'staging' - "staging"
- 'trying' - "trying"
pull_request: pull_request:
jobs: jobs:
build_and_test: build_and_test:
env: env:
BUF_VERSION: '0.56.0' BUF_VERSION: "0.56.0"
NIM_WAKU_VERSION: 'v0.9' NIM_WAKU_VERSION: "v0.9"
strategy: strategy:
matrix: matrix:
node: [16] node: [16]
@ -51,7 +51,7 @@ jobs:
- name: Install Protoc - name: Install Protoc
uses: arduino/setup-protoc@v1 uses: arduino/setup-protoc@v1
with: with:
version: '3.x' version: "3.x"
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Cache npm cache - name: Cache npm cache

View File

@ -3,26 +3,33 @@ name: Examples CI
on: on:
push: push:
branches: branches:
- 'master' - "master"
- 'staging' - "staging"
- 'trying' - "trying"
pull_request: pull_request:
jobs: jobs:
examples_build_and_test: examples_build_and_test:
strategy: strategy:
matrix: matrix:
example: [ web-chat, eth-pm, eth-pm-wallet-encryption, relay-reactjs-chat, store-reactjs-chat, relay-angular-chat ] example:
[
web-chat,
eth-pm,
eth-pm-wallet-encryption,
relay-reactjs-chat,
store-reactjs-chat,
relay-angular-chat,
]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Install NodeJS - name: Install NodeJS
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: '16' node-version: "16"
- name: Check if `yarn` or `npm` is used. - name: Check if `yarn` or `npm` is used.
id: use-yarn id: use-yarn

View File

@ -34,7 +34,7 @@
"build:umd:min:bundle": "webpack --config webpack.config.min.bundle.js", "build:umd:min:bundle": "webpack --config webpack.config.min.bundle.js",
"size": "npm run build:esm && size-limit", "size": "npm run build:esm && size-limit",
"fix": "run-s fix:*", "fix": "run-s fix:*",
"fix:prettier": "prettier \"src/**/*.ts\" \"./*.json\" \"*.conf.js\" --write", "fix:prettier": "prettier \"src/**/*.ts\" \"./*.json\" \"*.conf.js\" \".github/**/*.yml\" --write",
"fix:lint": "eslint src --ext .ts --fix", "fix:lint": "eslint src --ext .ts --fix",
"pretest": "run-s pretest:*", "pretest": "run-s pretest:*",
"pretest:1-init-git-submodules": "[ -f './nim-waku/build/wakunode2' ] || git submodule update --init --recursive", "pretest:1-init-git-submodules": "[ -f './nim-waku/build/wakunode2' ] || git submodule update --init --recursive",
@ -44,7 +44,7 @@
"nim-waku:force-build": "(cd nim-waku && rm -rf ./build/ ./vendor && make -j$(nproc --all 2>/dev/null || echo 2) update) && run-s nim-waku:build", "nim-waku:force-build": "(cd nim-waku && rm -rf ./build/ ./vendor && make -j$(nproc --all 2>/dev/null || echo 2) update) && run-s nim-waku:build",
"test": "run-s build test:*", "test": "run-s build test:*",
"test:lint": "eslint src --ext .ts", "test:lint": "eslint src --ext .ts",
"test:prettier": "prettier \"src/**/*.ts\" \"./*.json\" \"*.conf.js\" --list-different", "test:prettier": "prettier \"src/**/*.ts\" \"./*.json\" \"*.conf.js\" \".github/**/*.yml\" --list-different",
"test:spelling": "cspell \"{README.md,.github/*.md,guides/*.md,src/**/*.ts}\"", "test:spelling": "cspell \"{README.md,.github/*.md,guides/*.md,src/**/*.ts}\"",
"test:unit": "nyc --silent mocha", "test:unit": "nyc --silent mocha",
"test:karma": "karma start", "test:karma": "karma start",