github-action: use elastic/oblt-actions/github/is-member-of (#201) #150
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Test with multiple node versions. | |
name: test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- run: utils/run-install.sh | |
- run: utils/run-lint.sh | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [10, 12, 14, 16, 18, 20, 22] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Update npm to at least v7 for workspaces support | |
if: ${{ matrix.node-version < 16 }} # node@16 comes with npm@8, node@14 with npm@6 | |
run: npm install -g npm@7 # npm@7 supports node >=10 | |
- name: Install dependencies | |
run: utils/run-install.sh | |
- name: Test Node.js v${{ matrix.node-version }} | |
run: utils/run-test.sh |