Skip to content

Commit

Permalink
chore: update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
vkbansal committed Jul 26, 2022
1 parent 3e5375f commit c77fdbf
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 308 deletions.
45 changes: 38 additions & 7 deletions .github/workflows/master.yml → .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: master
name: main
on:
push:
branches:
- master
- main
jobs:
lint:
name: ESLint
runs-on: ubuntu-latest
#if: !contains(github.event.pull_request.title , '[skip ci]')
steps:
- name: Checkout
uses: actions/checkout@master
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
#if: !contains(github.event.pull_request.title , '[skip ci]')
steps:
- name: Checkout
uses: actions/checkout@master
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
#if: !contains(github.event.pull_request.title , '[skip ci]')
steps:
- name: Checkout
uses: actions/checkout@master
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
Expand All @@ -100,12 +100,12 @@ jobs:
- name: Prettier Check
run: pnpm fmtc
typecheck:
name: ESLint
name: Type Check
runs-on: ubuntu-latest
#if: !contains(github.event.pull_request.title , '[skip ci]')
steps:
- name: Checkout
uses: actions/checkout@master
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
Expand All @@ -130,3 +130,34 @@ jobs:
run: pnpm install
- name: Type Check
run: pnpm -r run typecheck
versions:
name: Versions Check
runs-on: ubuntu-latest
#if: !contains(github.event.pull_request.title , '[skip ci]')
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: '7.6.0'
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Type Check
run: node ./tools/bump-version.js --check
41 changes: 36 additions & 5 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
#if: !contains(github.event.pull_request.title , '[skip ci]')
steps:
- name: Checkout
uses: actions/checkout@master
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
#if: !contains(github.event.pull_request.title , '[skip ci]')
steps:
- name: Checkout
uses: actions/checkout@master
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
#if: !contains(github.event.pull_request.title , '[skip ci]')
steps:
- name: Checkout
uses: actions/checkout@master
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
Expand All @@ -100,12 +100,12 @@ jobs:
- name: Prettier Check
run: pnpm fmtc
typecheck:
name: ESLint
name: Type Check
runs-on: ubuntu-latest
#if: !contains(github.event.pull_request.title , '[skip ci]')
steps:
- name: Checkout
uses: actions/checkout@master
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
Expand All @@ -130,3 +130,34 @@ jobs:
run: pnpm install
- name: Type Check
run: pnpm -r run typecheck
versions:
name: Versions Check
runs-on: ubuntu-latest
#if: !contains(github.event.pull_request.title , '[skip ci]')
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: '7.6.0'
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Type Check
run: node ./tools/bump-version.js --check
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
pnpm run lint
pnpm run fmtc
pnpm run -r typecheck

node ./tools/bump-version.js --check
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"eslint-plugin-react": "^7.26.1",
"globby": "^13.1.2",
"husky": "^8.0.1",
"lint-staged": "^13.0.3",
"prettier": "^2.4.1",
"rimraf": "~3.0.2",
"typescript": "^4.7.4"
Expand Down
Loading

0 comments on commit c77fdbf

Please sign in to comment.