Skip to content

Commit

Permalink
chore(CI): Format, lint, build [skip-ci] (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaut authored Jan 2, 2024
1 parent 4ff607d commit 6edafb5
Show file tree
Hide file tree
Showing 15 changed files with 542 additions and 28 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build
on: pull_request
jobs:
extract:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set user
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
# use node module caching
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: install packages
run: yarn install --immutable

- name: build
run: yarn build:all
23 changes: 23 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Format
on: pull_request
jobs:
extract:
name: prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set user
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
# use node module caching
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: install packages
run: yarn install --immutable

- name: prettier
run: yarn format-check:all
23 changes: 23 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint
on: pull_request
jobs:
extract:
name: eslint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set user
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
# use node module caching
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: install packages
run: yarn install --immutable

- name: lint
run: yarn lint:all
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: Release Plugin

on:
push:
Expand Down
6 changes: 3 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.yarn
lib/**/*
build/**/*
packages/**/dist/**/*
**/lib
**/build
**/dist
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"license": "Apache-2.0",
"scripts": {
"plugin:build": "yarn workspace @chainsafe/cypress-polkadot-wallet build",
"build": "yarn workspaces foreach --all run build",
"lint": "yarn workspaces foreach --all run lint",
"formatAll": "yarn workspaces foreach --all run format",
"formatAll-check": "yarn workspaces foreach --all run format-check"
"build:all": "yarn workspaces foreach --all run build",
"lint:all": "yarn workspaces foreach --all run lint",
"format:all": "yarn workspaces foreach --all run format",
"format-check:all": "yarn workspaces foreach --all run format-check"
},
"workspaces": [
"packages/*"
Expand Down
4 changes: 4 additions & 0 deletions packages/example/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.yarn
**/lib
**/build
**/dist
2 changes: 1 addition & 1 deletion packages/example/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defineConfig } from 'cypress'

export default defineConfig({
e2e: {
setupNodeEvents(on, config) {
setupNodeEvents() {
// implement node event listeners here
}
}
Expand Down
10 changes: 5 additions & 5 deletions packages/example/cypress/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"types": ["cypress"]
},
"include": ["./**/*.ts"]
}
"compilerOptions": {
"types": ["cypress"]
},
"include": ["./**/*.ts"]
}
6 changes: 3 additions & 3 deletions packages/example/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src", "./*.ts"],
}
"include": ["src", "./*.ts"]
}
4 changes: 4 additions & 0 deletions packages/plugin/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.yarn
**/lib
**/build
**/dist
3 changes: 1 addition & 2 deletions packages/plugin/dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ declare global {
/**
* Initialized the Polkadot extension. If an origin is passed there is no need to authorize the first connection for Dapps of this origin
* @param {InjectedAccount[]} accounts - Accounts to load into the extension.
* @param {string | undefined} origin - Dapp name to automatically share accounts without needing to authorize
* @param {string} origin - Dapp name to allow the accounts for automatically
* @param {string | undefined} origin - Dapp name to automatically share accounts with, without needing to authorize
* @example cy.initExtension([{ address: '7NPoMQbiA6trJKkjB35uk96MeJD4PGWkLQLH7k7hXEkZpiba', name: 'Alice', type: 'sr25519'}], 'Multix')
*/
initExtension: (accounts: InjectedAccountWitMnemonic[], origin?: string) => Chainable<AUTWindow>;
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"rootDir": "./src",
"outDir": "./dist",
// "allowJs": false,
"declaration": true,
"declaration": true
},
"include": ["src/**/*.ts"]
}
2 changes: 1 addition & 1 deletion packages/plugin/tsconfig.tsbuildinfo

Large diffs are not rendered by default.

Loading

0 comments on commit 6edafb5

Please sign in to comment.