mirror of
https://github.com/pnpm/pnpm.git
synced 2026-02-02 03:02:49 -05:00
48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
node:
|
|
- '12.17'
|
|
- '14'
|
|
- '16'
|
|
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: Setup Node
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
- name: checkout main
|
|
run: git branch -f main origin/main
|
|
- name: install pnpm and npm
|
|
run: |
|
|
curl -L https://get.pnpm.io/v6.js | node - add --global pnpm@next npm@7
|
|
- name: pnpm install
|
|
run: pnpm install
|
|
- name: Audit
|
|
run: pnpm audit
|
|
- 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
|