Files
pnpm/.github/workflows/ci.yml
Zoltan Kochan b865ff0b04 revert: "ci: test on Node.js 18"
This reverts commit 41a9e1caca.
2022-04-23 18:48:04 +03:00

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