Skip to content

Commit 99d584a

Browse files
committed
docs: enhance the readme example to include multiple os, version, and archs
1 parent 2a5c060 commit 99d584a

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

README.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,24 +74,38 @@ jobs:
7474
- run: npm test
7575
```
7676

77-
Architecture:
78-
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).
77+
Operating Systems and Architecture:
78+
79+
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).
7980
```yaml
8081
jobs:
8182
build:
82-
runs-on: windows-latest
83+
runs-on: ${{ matrix.os }}
8384
strategy:
8485
matrix:
85-
node: [ '10', '12' ]
86-
arch: ['x86', 'x64']
87-
name: Node ${{ matrix.node }} on ${{ matrix.arch }}
86+
os:
87+
- ubuntu-latest
88+
- macos-latest
89+
- windows-latest
90+
node_version:
91+
- 10
92+
- 12
93+
- 14
94+
node_arch:
95+
- x64
96+
# an extra windows-x86 run:
97+
include:
98+
- os: windows-2016
99+
node_version: 12
100+
node_arch: x86
101+
name: Node ${{ matrix.node_version }} - ${{ matrix.node_arch }} on ${{ matrix.os }}
88102
steps:
89103
- uses: actions/checkout@v2
90104
- name: Setup node
91105
uses: actions/setup-node@v1
92106
with:
93-
node-version: ${{ matrix.node }}
94-
node-arch: ${{ matrix.arch }}
107+
node-version: ${{ matrix.node_version }}
108+
node-arch: ${{ matrix.node_arch }}
95109
- run: npm install
96110
- run: npm test
97111
```

0 commit comments

Comments
 (0)