feat: login auth and redux-toolkit practice #5
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
name: CI | |
on: | |
pull_request: | |
branches: master | |
jobs: | |
CI: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
# https://github.com/marketplace/actions/checkout | |
uses: actions/checkout@v3 | |
- name: Use Node.js | |
# https://github.com/marketplace/actions/setup-node-js-environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
# https://github.com/actions/cache/blob/main/examples.md#node---yarn | |
# https://stackoverflow.com/questions/67136614/cache-node-modules-in-github-actions | |
# - name: Get yarn cache directory path | |
# id: yarn-cache-dir-path | |
# run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
# - uses: actions/cache@v3 | |
# # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
# 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 --prefer-offline | |
# https://github.com/pnpm/action-setup | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
id: pnpm-install | |
with: | |
# https://github.com/pnpm/pnpm/issues/6649#issuecomment-1579588911 | |
version: 8 | |
run_install: false | |
- name: Get pnpm store directory | |
id: pnpm-cache | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- name: Setup pnpm cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install | |
- name: Running Lint | |
run: pnpm lint | |
# - name: Running Test | |
# run: yarn test |