docs: enhance the readme example to include multiple os, version, and archs

This commit is contained in:
Amin Yahyaabadi 2020-09-06 11:32:03 -05:00
parent 2a5c060ce2
commit 99d584aa06

View File

@ -74,24 +74,38 @@ jobs:
- run: npm test - run: npm test
``` ```
Architecture: Operating Systems and Architecture:
The architecture can be selected using `node-arch`. Values are `x86`, `x64`, `arm64`, `armv6l`, `armv7l`, `ppc64le`, `s390x` (not all of the architectures are available on all platforms).
You can use any of the [supported operating systems](https://docs.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners). The architecture can be selected using `node-arch`. Values are `x86`, `x64`, `arm64`, `armv6l`, `armv7l`, `ppc64le`, `s390x` (not all of the architectures are available on all platforms).
```yaml ```yaml
jobs: jobs:
build: build:
runs-on: windows-latest runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
node: [ '10', '12' ] os:
arch: ['x86', 'x64'] - ubuntu-latest
name: Node ${{ matrix.node }} on ${{ matrix.arch }} - macos-latest
- windows-latest
node_version:
- 10
- 12
- 14
node_arch:
- x64
# an extra windows-x86 run:
include:
- os: windows-2016
node_version: 12
node_arch: x86
name: Node ${{ matrix.node_version }} - ${{ matrix.node_arch }} on ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Setup node - name: Setup node
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: ${{ matrix.node }} node-version: ${{ matrix.node_version }}
node-arch: ${{ matrix.arch }} node-arch: ${{ matrix.node_arch }}
- run: npm install - run: npm install
- run: npm test - run: npm test
``` ```