From: Jérôme Benoit Date: Sat, 22 Apr 2023 21:55:48 +0000 (+0200) Subject: build(ci): enable dependencies caching with pnpm X-Git-Tag: v1.2.11~6 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=e387442190140204cdbb9d1716fcf9db4c069a61;p=e-mobility-charging-stations-simulator.git build(ci): enable dependencies caching with pnpm Signed-off-by: Jérôme Benoit --- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 290c1923..749ba7ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,24 +17,25 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - uses: pnpm/action-setup@v2 + with: + version: 8 - name: Setup node ${{ matrix.node }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} + cache: 'pnpm' - name: pnpm install - run: | - corepack enable - corepack prepare pnpm@latest --activate - pnpm install - - name: pnpm run lint - run: pnpm run lint - - name: pnpm run build - run: pnpm run build + run: pnpm install + - name: pnpm lint + run: pnpm lint + - name: pnpm build + run: pnpm build - name: pnpm test run: pnpm test - - name: pnpm run coverage + - name: pnpm coverage if: "github.repository == 'sap/e-mobility-charging-stations-simulator' && matrix.os == 'ubuntu-latest' && matrix.node == '18.x'" - run: pnpm run coverage + run: pnpm coverage - name: SonarCloud Scan if: "github.repository == 'sap/e-mobility-charging-stations-simulator' && matrix.os == 'ubuntu-latest' && matrix.node == '18.x'" uses: sonarsource/sonarcloud-github-action@v1.8 @@ -54,24 +55,25 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - uses: pnpm/action-setup@v2 + with: + version: 8 - name: Setup node ${{ matrix.node }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} + cache: 'pnpm' - name: pnpm install - run: | - corepack enable - corepack prepare pnpm@latest --activate - pnpm install - - name: pnpm run lint - run: pnpm run lint - - name: pnpm run build - run: pnpm run build + run: pnpm install + - name: pnpm lint + run: pnpm lint + - name: pnpm build + run: pnpm build - name: pnpm test run: pnpm test - # - name: pnpm run coverage + # - name: pnpm coverage # if: "github.repository == 'sap/e-mobility-charging-stations-simulator' && matrix.os == 'ubuntu-latest' && matrix.node == '18.x'" - # run: pnpm run coverage + # run: pnpm coverage # - name: SonarCloud Scan # if: "github.repository == 'sap/e-mobility-charging-stations-simulator' && matrix.os == 'ubuntu-latest' && matrix.node == '18.x'" # uses: sonarsource/sonarcloud-github-action@v1.8