mirror of
https://github.com/pnpm/pnpm.git
synced 2026-01-27 16:28:59 -05:00
61 lines
1.6 KiB
YAML
61 lines
1.6 KiB
YAML
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
node:
|
|
- '14.19'
|
|
- '16'
|
|
- '17'
|
|
platform:
|
|
- ubuntu-latest
|
|
- windows-latest
|
|
|
|
name: '${{matrix.platform}} / Node.js ${{ matrix.node }}'
|
|
runs-on: ${{matrix.platform}}
|
|
|
|
steps:
|
|
- name: Configure Git
|
|
run: |
|
|
git config --global core.autocrlf false
|
|
git config --global user.name "xyz"
|
|
git config --global user.email "x@y.z"
|
|
- name: Checkout Commit
|
|
uses: actions/checkout@v1
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v2.2.0
|
|
with:
|
|
version: next-7
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
cache: 'pnpm'
|
|
- name: Install npm@7
|
|
run: npm add --global npm@7
|
|
- name: pnpm install
|
|
run: pnpm install
|
|
- name: Audit
|
|
run: pnpm audit
|
|
- name: Cache TypeScript and Jest
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
packages/*/lib
|
|
packages/*/tsconfig.tsbuildinfo
|
|
privatePackages/*/lib
|
|
privatePackages/*/tsconfig.tsbuildinfo
|
|
.jest-cache
|
|
key: ts-jest-${{ matrix.platform }}-${{ matrix.node }}-${{ github.run_id }}
|
|
restore-keys: ts-jest-${{ matrix.platform }}-${{ matrix.node }}-
|
|
- name: run tests (main)
|
|
if: github.ref == 'refs/heads/main'
|
|
run: pnpm run test-main
|
|
- name: run tests (branch)
|
|
if: github.ref != 'refs/heads/main'
|
|
run: pnpm run test-branch
|