From 885918dff435b2479e7bc3e978ab53191ebce89d Mon Sep 17 00:00:00 2001 From: Hideki Igarashi Date: Sat, 30 Dec 2023 21:37:35 +0900 Subject: [PATCH 1/3] style: change the workflow files format --- .github/workflows/ci.yaml | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6439a7f8..286685e3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,58 +5,50 @@ on: branches: - main - "renovate/**" - pull_request: jobs: lint: runs-on: ubuntu-latest - steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup Node.js uses: actions/setup-node@v4 with: node-version-file: .node-version cache: npm - - name: Install dependencies run: npm ci - - name: Run lint run: npm run lint package: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Node.js + uses: actions/setup-node@v4 with: node-version-file: .node-version cache: npm - - name: Install dependencies run: npm ci - - name: Package extension run: npm run package build-storybook: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Node.js + uses: actions/setup-node@v4 with: node-version-file: .node-version cache: npm - - name: Install dependencies run: npm ci - - name: Build Storybook run: npm run build-storybook From be961cc0953468ffb775afe7dc819b974eb7a750 Mon Sep 17 00:00:00 2001 From: Hideki Igarashi Date: Sat, 30 Dec 2023 21:44:09 +0900 Subject: [PATCH 2/3] chore: change workflow not to trigger on push to renovate branch --- .github/workflows/ci.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 286685e3..940140a6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,7 +4,6 @@ on: push: branches: - main - - "renovate/**" pull_request: jobs: From 6f4b92800846b07fe6a01b80e3389eed3193a36c Mon Sep 17 00:00:00 2001 From: Hideki Igarashi Date: Sat, 30 Dec 2023 21:50:39 +0900 Subject: [PATCH 3/3] chore: change to cache node_modules directory --- .github/workflows/ci.yaml | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 940140a6..6ba80376 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,8 +16,15 @@ jobs: uses: actions/setup-node@v4 with: node-version-file: .node-version - cache: npm + - name: Cache node_modules + id: cache-node-modules + uses: actions/cache@v3 + with: + path: node_modules + key: node-modules-${{ runner.os }}-${{ hashFiles('.node-version') }}-${{ hashFiles('package-lock.json') }} + restore-keys: node-modules-${{ runner.os }}-${{ hashFiles('.node-version') }}-${{ hashFiles('package-lock.json') }} - name: Install dependencies + if: steps.cache-node-modules.outputs.cache-hit != 'true' run: npm ci - name: Run lint run: npm run lint @@ -31,8 +38,15 @@ jobs: uses: actions/setup-node@v4 with: node-version-file: .node-version - cache: npm + - name: Cache node_modules + id: cache-node-modules + uses: actions/cache@v3 + with: + path: node_modules + key: node-modules-${{ runner.os }}-${{ hashFiles('.node-version') }}-${{ hashFiles('package-lock.json') }} + restore-keys: node-modules-${{ runner.os }}-${{ hashFiles('.node-version') }}-${{ hashFiles('package-lock.json') }} - name: Install dependencies + if: steps.cache-node-modules.outputs.cache-hit != 'true' run: npm ci - name: Package extension run: npm run package @@ -46,8 +60,15 @@ jobs: uses: actions/setup-node@v4 with: node-version-file: .node-version - cache: npm + - name: Cache node_modules + id: cache-node-modules + uses: actions/cache@v3 + with: + path: node_modules + key: node-modules-${{ runner.os }}-${{ hashFiles('.node-version') }}-${{ hashFiles('package-lock.json') }} + restore-keys: node-modules-${{ runner.os }}-${{ hashFiles('.node-version') }}-${{ hashFiles('package-lock.json') }} - name: Install dependencies + if: steps.cache-node-modules.outputs.cache-hit != 'true' run: npm ci - name: Build Storybook run: npm run build-storybook