name: CI on: [push, pull_request] jobs: build: strategy: fail-fast: false matrix: node: - '10.16' - '12' - '14' 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 run: | npm install --global pnpm@next pnpm --version - name: Install npm v6 run: pnpm add --global npm@6 - name: pnpm install run: pnpm install - 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