Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update development workflow #690

Merged
merged 6 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn

- name: Install dependencies
run: yarn install

- name: Run tests
run: yarn test

- name: Run linter
run: yarn lint

- name: Check types
run: yarn types
25 changes: 8 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,22 @@ jobs:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: checkout code repository
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: setup node.js
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 18.x
cache: yarn

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: install dependencies
run: yarn install && yarn clean && yarn prepare
- name: Install dependencies
run: yarn install

- name: build
run: yarn prepare

- name: Create Release Pull Request or Publish to npm
id: changesets
Expand Down
24 changes: 10 additions & 14 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,23 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Pages
uses: actions/configure-pages@v3

- uses: actions/setup-node@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18.x'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
node-version: 18.x
cache: yarn

- uses: actions/cache@v1
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install

- run: yarn install && yarn clean && yarn prepare
- name: build
run: yarn prepare

- run: cd ./example/app && yarn install && yarn build:web

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "yarn test && yarn lint && yarn types"
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"commitlint": {
Expand Down
Loading