- 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
- 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