|
| 1 | +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node |
| 2 | +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions |
| 3 | + |
| 4 | +name: Node.js CI |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + branches: [ master ] |
| 9 | + pull_request: |
| 10 | + branches: [ master ] |
| 11 | + |
| 12 | +jobs: |
| 13 | + |
| 14 | + build_on_windows: |
| 15 | + runs-on: windows-latest |
| 16 | + steps: |
| 17 | + - uses: actions/checkout@v2 |
| 18 | + - name: Use Node.js ${{ matrix.node-version }} |
| 19 | + uses: actions/setup-node@v2 |
| 20 | + with: |
| 21 | + node-version: ${{ matrix.node-version }} |
| 22 | + - uses: actions/cache@v2 |
| 23 | + with: |
| 24 | + path: ~/.pnpm-store |
| 25 | + key: ${{ runner.os }}-pnpm-store |
| 26 | + - run: pip3 install conan |
| 27 | + - run: npm install -g pnpm@6 |
| 28 | + - run: pnpm recursive install |
| 29 | + - run: pnpm run build --if-present |
| 30 | + - run: pnpm run pretest |
| 31 | + - run: pnpm test |
| 32 | + build: |
| 33 | + runs-on: ubuntu-latest |
| 34 | + strategy: |
| 35 | + matrix: |
| 36 | + node-version: [14.x] |
| 37 | + |
| 38 | + steps: |
| 39 | + - uses: actions/checkout@v2 |
| 40 | + - name: Use Node.js ${{ matrix.node-version }} |
| 41 | + uses: actions/setup-node@v2 |
| 42 | + with: |
| 43 | + node-version: ${{ matrix.node-version }} |
| 44 | + - run: pip3 install conan |
| 45 | + - run: npm install -g pnpm@6 |
| 46 | + - uses: actions/cache@v2 |
| 47 | + with: |
| 48 | + path: ~/.pnpm-store |
| 49 | + key: ${{ runner.os }}-pnpm-store |
| 50 | + - run: npm install -g pnpm@6 |
| 51 | + - run: pnpm recursive install |
| 52 | + - run: pnpm run build |
| 53 | + - run: pnpm run pretest |
| 54 | + - run: pnpm test |
0 commit comments