Skip to content

Commit

Permalink
chore: fold CI actions into GitHub Actions, deploy SB to GH Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiehenson committed Mar 15, 2024
1 parent 59b3487 commit 661400a
Show file tree
Hide file tree
Showing 18 changed files with 986 additions and 358 deletions.
110 changes: 0 additions & 110 deletions .circleci/config.yml

This file was deleted.

20 changes: 19 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
"plugin:react/recommended",
"prettier",
"plugin:cypress/recommended",
"plugin:storybook/recommended"
"plugin:storybook/recommended",
],
parserOptions: {
ecmaFeatures: {
Expand All @@ -26,4 +26,22 @@ module.exports = {
version: "detect",
},
},
overrides: [
{
files: ["*.ts", "*.tsx"],
extends: [
"plugin:react/recommended",
"prettier",
"plugin:cypress/recommended",
"plugin:storybook/recommended",
"plugin:@typescript-eslint/recommended",
],
plugins: ["@typescript-eslint"],
rules: {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-non-null-assertion": 0,
"react/display-name": "off",
},
},
],
};
36 changes: 36 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Run linters and Cypress

on:
push:
branches-ignore:
- "gh-pages"
pull_request:
types: [closed]
branches:
- main

jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 16
- name: Install dependencies
run: yarn
- name: Lint
uses: wearerequired/lint-action@v2
with:
eslint: true
prettier: true
# Cypress disabled until tests rewritten to use new SB paths
# - name: Cypress
# uses: cypress-io/github-action@v6
# with:
# start: yarn start
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ jobs:
git config --global user.name "Github Action"
./scripts/release.sh "${GITHUB_REF/refs\/tags\//}"
shell: bash
- uses: bitovi/[email protected]
with:
install_command: yarn install
build_command: yarn build-storybook
path: preview
checkout: false
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
vendor
./core
./reset
preview
node_modules
3 changes: 3 additions & 0 deletions bs-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{

Check failure on line 1 in bs-config.json

View workflow job for this annotation

GitHub Actions / Prettier

bs-config.json#L1

There are issues with this file's formatting, please run Prettier to fix the errors
"port": 5000
}
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
"@storybook/react": "^7.6.4",
"@storybook/react-webpack5": "^7.6.4",
"@storybook/test": "^7.6.4",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"autoprefixer": "^10.0.2",
"babel-loader": "^8.2.0",
"blink-diff": "^1.0.13",
Expand All @@ -41,6 +43,7 @@
"eslint-plugin-storybook": "^0.6.15",
"extra-watch-webpack-plugin": "^1.0.3",
"find-imports": "^1.1.0",
"lite-server": "^2.6.1",
"mini-css-extract-plugin": "^1.2.1",
"msw": "1.3.2",
"msw-storybook-addon": "^1.10.0",
Expand All @@ -55,6 +58,7 @@
"style-loader": "^3.3.3",
"svg-spritemap-webpack-plugin": "^3.7.1",
"tailwindcss": "^3.3.6",
"typescript": "5.3.3",
"webpack": "^5.3.2",
"webpack-cli": "^4.2.0",
"yargs": "^16.2.0"
Expand All @@ -64,14 +68,15 @@
"build:verbose": "node scripts/build.js -v",
"watch": "node scripts/build.js -w",
"dev": "./scripts/cleanstart.sh",
"format:check": "yarn prettier -c *.js src src/**/*.jsx cypress",
"format:write": "yarn prettier -w *.js src src/**/*.jsx cypress",
"lint": "eslint *.js src src/**/*.jsx cypress",
"format:check": "yarn prettier -c *.{js,ts} src/**/*.{js,jsx,ts,tsx} cypress",
"format:write": "yarn prettier -w *.{js,ts} src/**/*.{js,jsx,ts,tsx} cypress",
"lint": "eslint *.{js,ts} src/**/*.{js,jsx,ts,tsx} cypress",
"cy:open": "cypress open",
"cy:headless": "cypress run --quiet",
"update:all": "./scripts/update-dependents.sh",
"pre-release": "./scripts/pre-release.sh",
"release": "./scripts/release.sh",
"start": "lite-server -- port 5000",
"storybook": "storybook dev -p 6006 --no-version-updates",
"build-storybook": "storybook build -o preview"
},
Expand Down Expand Up @@ -106,4 +111,4 @@
"msw": {
"workerDirectory": "public"
}
}
}
Loading

0 comments on commit 661400a

Please sign in to comment.