From 99d584aa06f947eb56f0dd38ca328bb7e0e9b0ff Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Sun, 6 Sep 2020 11:32:03 -0500 Subject: [PATCH] docs: enhance the readme example to include multiple os, version, and archs --- README.md | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index a63f70c3..0f5de87f 100644 --- a/README.md +++ b/README.md @@ -74,24 +74,38 @@ jobs: - run: npm test ``` -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). +Operating Systems and Architecture: + +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 jobs: build: - runs-on: windows-latest + runs-on: ${{ matrix.os }} strategy: matrix: - node: [ '10', '12' ] - arch: ['x86', 'x64'] - name: Node ${{ matrix.node }} on ${{ matrix.arch }} + os: + - ubuntu-latest + - 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: - uses: actions/checkout@v2 - name: Setup node uses: actions/setup-node@v1 with: - node-version: ${{ matrix.node }} - node-arch: ${{ matrix.arch }} + node-version: ${{ matrix.node_version }} + node-arch: ${{ matrix.node_arch }} - run: npm install - run: npm test ```