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

refactor(ci): #4 #6

Merged
merged 1 commit into from
Jul 11, 2023
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
38 changes: 10 additions & 28 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,49 +5,31 @@ on: pull_request
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]

steps:
- name: Checkout
uses: actions/checkout@v3

- uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 8.6.2

- name: Use Node.js ${{ matrix.node-version }}
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 18
node-version: ${{ matrix.node-version }}
cache: pnpm
registry-url: 'https://npm.pkg.github.com'
scope: '@saitamau-maximum'
always-auth: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

- uses: pnpm/[email protected]
with:
version: 8.6.2

- name: Expose pnpm config(s) through "$GITHUB_OUTPUT"
id: pnpm-config
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Cache rotation keys
id: cache-rotation
shell: bash
run: |
echo "YEAR_MONTH=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-config.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-

- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile --prefer-offline

- name: format
Expand Down
37 changes: 10 additions & 27 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,47 +5,30 @@ on: pull_request
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]

steps:
- name: Checkout
uses: actions/checkout@v3

- uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: 8.6.2

- name: Use Node.js ${{ matrix.node-version }}
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 18
node-version: ${{ matrix.node-version }}
cache: pnpm
registry-url: 'https://npm.pkg.github.com'
scope: '@saitamau-maximum'
always-auth: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}

- uses: pnpm/[email protected]
with:
version: 8.6.2

- name: Expose pnpm config(s) through "$GITHUB_OUTPUT"
id: pnpm-config
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT

- name: Cache rotation keys
id: cache-rotation
shell: bash
run: |
echo "YEAR_MONTH=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-config.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-cache-${{ steps.cache-rotation.outputs.YEAR_MONTH }}-

- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile --prefer-offline
Expand Down