From 4b1de90ac07bde6699338177eccdd5fe64536409 Mon Sep 17 00:00:00 2001 From: Oscar Dominguez Date: Sun, 18 Jul 2021 22:46:19 +0200 Subject: [PATCH 1/2] ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows --- .github/workflows/branch.yml | 37 ++++++++++++++++++------------------ .github/workflows/tag.yml | 29 ++++++++++++++-------------- 2 files changed, 34 insertions(+), 32 deletions(-) diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index d6ecd22..666d044 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -3,37 +3,38 @@ name: Branch (CI) on: push: branches: - - '**' + - "**" tags-ignore: - - '**' + - "**" paths-ignore: - - '.vscode/**' - - 'scripts/**' + - ".vscode/**" + - "scripts/**" pull_request: branches: - - '**' + - "**" tags-ignore: - - '**' + - "**" paths-ignore: - - '.vscode/**' - - 'scripts/**' + - ".vscode/**" + - "scripts/**" jobs: test: name: Node.js v14 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 14 + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14 + cache: npm - - name: Install - run: yarn install + - name: Install + run: yarn install - - name: TypeCheck - run: yarn test + - name: TypeCheck + run: yarn test - - name: Compiles - run: yarn build + - name: Compiles + run: yarn build diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index a306a2d..08e011a 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -3,9 +3,9 @@ name: Tag (CD) on: push: branches-ignore: - - '**' + - "**" tags: - - 'v**' + - "v**" env: # cfw authentication values @@ -23,19 +23,20 @@ jobs: name: Node.js v14 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 14 + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14 + cache: npm - - name: Install - run: yarn install + - name: Install + run: yarn install - - name: Type Check - run: yarn test + - name: Type Check + run: yarn test - - name: Compiles - run: yarn build + - name: Compiles + run: yarn build - - name: Deploy - run: yarn deploy + - name: Deploy + run: yarn deploy From e58ffee274722a58e37629eba143c7186090571a Mon Sep 17 00:00:00 2001 From: Oscar Dominguez Date: Sun, 18 Jul 2021 22:47:25 +0200 Subject: [PATCH 2/2] fix(workflows): use 'yarn' cache option --- .github/workflows/branch.yml | 2 +- .github/workflows/tag.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index 666d044..b30c3ec 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -28,7 +28,7 @@ jobs: - uses: actions/setup-node@v2 with: node-version: 14 - cache: npm + cache: yarn - name: Install run: yarn install diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 08e011a..c797414 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -27,7 +27,7 @@ jobs: - uses: actions/setup-node@v2 with: node-version: 14 - cache: npm + cache: yarn - name: Install run: yarn install