-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from nus3/update-library
Update library
- Loading branch information
Showing
89 changed files
with
10,452 additions
and
19,283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: 'Install' | ||
description: 'Set up and install dependencies' | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- uses: pnpm/action-setup@v3 | ||
name: Install pnpm | ||
with: | ||
version: 8 | ||
run_install: false | ||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- uses: actions/cache@v4 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
shell: bash | ||
run: pnpm install --frozen-lockfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,95 +1,39 @@ | ||
name: Node CI | ||
on: | ||
pull_request: | ||
branches: ['**'] | ||
branches: ["**"] | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16.11.0' | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
# REF: https://dev.to/mpocock1/how-to-cache-nodemodules-in-github-actions-with-yarn-24eh | ||
# REF: https://zenn.dev/link/comments/71195269e61d4f | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-modules-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }} | ||
- name: Install dependencies | ||
run: yarn --immutable | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- setup | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16.11.0' | ||
# REF:(nus3) https://dev.classmethod.jp/articles/github-actions-parallel-deploy/ | ||
- name: Restore node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-modules-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }} | ||
uses: actions/checkout@v4 | ||
- name: Install | ||
uses: ./.github/actions/install | ||
- name: 🚨 Test | ||
run: yarn test | ||
run: pnpm test | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- setup | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16.11.0' | ||
- name: Restore node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-modules-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }} | ||
uses: actions/checkout@v4 | ||
- name: Install | ||
uses: ./.github/actions/install | ||
- name: 💅🏼 Lint | ||
run: yarn lint | ||
run: pnpm lint | ||
- name: ✅ Type check | ||
run: yarn type-check | ||
run: pnpm type-check | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- setup | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16.11.0' | ||
# REF:(nus3) https://dev.classmethod.jp/articles/github-actions-parallel-deploy/ | ||
- name: Restore node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-modules-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }} | ||
uses: actions/checkout@v4 | ||
- name: Install | ||
uses: ./.github/actions/install | ||
- name: 🔨 Build | ||
run: yarn build | ||
run: pnpm build |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.