with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis. This is needed for better sonar
+ - name: Setup pnpm
+ 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: Install
- run: |
- corepack enable
- corepack prepare pnpm@latest --activate
- pnpm install
+ run: pnpm install
- name: Build
- run: pnpm run build
+ run: pnpm build
- name: Lint
- run: pnpm run lint
+ run: pnpm lint
- name: Tests
- run: pnpm run test
+ run: pnpm test
- name: Coverage Report
if: "github.repository == 'poolifier/poolifier' && matrix.os == 'ubuntu-latest' && matrix.node == '18.x'"
- run: pnpm run coverage
+ run: pnpm coverage
- name: Sonar Code Analysis
if: "github.repository == 'poolifier/poolifier' && matrix.os == 'ubuntu-latest' && matrix.node == '18.x'"
- name: Benchmark
if: github.event.inputs.withBenchmark
- run: pnpm run benchmark
+ run: pnpm benchmark
- name: Checkout
uses: actions/checkout@v3
+ - name: Setup pnpm
+ uses: pnpm/action-setup@v2
+ with:
+ version: 8
+
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '18.x'
+ cache: 'pnpm'
- name: Generate documentation
run: |
- corepack enable
- corepack prepare pnpm@latest --activate
pnpm install
- pnpm run typedoc
+ pnpm typedoc
- name: Commit files
if: "github.repository == 'poolifier/poolifier' && github.ref == 'refs/heads/${{ github.event.repository.default_branch }}'"
- name: Checkout
uses: actions/checkout@v3
+ - name: Setup pnpm
+ uses: pnpm/action-setup@v2
+ with:
+ version: 8
+
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18.x'
+ cache: 'pnpm'
- name: Install
- run: |
- corepack enable
- corepack prepare pnpm@latest --activate
- pnpm install
+ run: pnpm install
- name: Tests & Coverage
run: |
- pnpm run test
- pnpm run coverage
+ pnpm test
+ pnpm coverage
- name: Lint
- run: pnpm run lint
+ run: pnpm lint
- name: Production Build
- run: pnpm run build:prod
+ run: pnpm build:prod
publish:
needs: build
- name: Checkout
uses: actions/checkout@v3
+ - name: Setup pnpm
+ uses: pnpm/action-setup@v2
+ with:
+ version: 8
+
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: https://registry.npmjs.org/
+ cache: 'pnpm'
- name: Read package.json version
id: package-version
uses: jaywcjlove/github-action-package@main
- name: Install
- run: |
- corepack enable
- corepack prepare pnpm@latest --activate
- pnpm install
+ run: pnpm install
- name: Publish Release
if: ${{ contains(steps.package-version.outputs.version, '-') == false }}