Files
pnpm/.github/workflows/ci.yml
2021-12-06 19:35:26 +02:00

50 lines
1.1 KiB
YAML

name: CI
on: [push, pull_request]
jobs:
build:
strategy:
fail-fast: false
matrix:
node:
- '12.17'
- '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.0.1
with:
version: next
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: Install npm@7
run: pnpm add --global 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