mirror of
https://github.com/aminya/setup-cpp
synced 2024-11-30 21:22:30 +08:00
54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
name: CI
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
- main
|
|
|
|
jobs:
|
|
Test:
|
|
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- windows-2019
|
|
- ubuntu-20.04
|
|
- macos-10.15
|
|
node:
|
|
- 14 # installed on the images
|
|
pnpm:
|
|
- 6
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.pnpm-store
|
|
D:\.pnpm-store
|
|
key: "setupcpp-cache-OS:${{ matrix.os }}-node:${{ matrix.node }}-pnpm:${{ matrix.pnpm }}-${{ hashFiles('./.npmrc') }}-deps:${{ hashFiles('./package.json') }}"
|
|
restore-keys: |
|
|
"setupcpp-cache-OS:${{ matrix.os }}"
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
|
|
- name: Setup Pnpm
|
|
uses: pnpm/action-setup@v2
|
|
with:
|
|
version: ${{ matrix.pnpm }}
|
|
|
|
- name: Install and build
|
|
run: |
|
|
pnpm install
|
|
|
|
- name: Test
|
|
run: |
|
|
pnpm test
|