1
0
Fork 0
toolkit/.github/workflows/unit-tests.yml

56 lines
1.3 KiB
YAML
Raw Normal View History

name: toolkit-unit-tests
on:
2019-10-03 16:45:11 +00:00
push:
branches:
- main
2019-10-03 17:07:22 +00:00
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
jobs:
build:
name: Build
strategy:
matrix:
runs-on: [ubuntu-latest, macos-latest-large, windows-latest]
2024-10-04 20:37:08 +00:00
2024-10-07 15:04:47 +00:00
# Node 18 is the current default Node version in hosted runners, so users may still use the toolkit with it when running tests (see https://github.com/actions/toolkit/issues/1841)
2024-10-04 20:37:08 +00:00
# Node 20 is the currently support Node version for actions - https://docs.github.com/actions/sharing-automations/creating-actions/metadata-syntax-for-github-actions#runsusing-for-javascript-actions
2024-10-07 15:04:47 +00:00
node-version: [18.x, 20.x]
fail-fast: false
runs-on: ${{ matrix.runs-on }}
2019-07-26 03:00:31 +00:00
steps:
2019-07-26 03:08:57 +00:00
- name: Checkout
uses: actions/checkout@v4
2019-07-26 03:08:57 +00:00
2024-10-04 20:37:08 +00:00
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
2024-10-04 20:37:08 +00:00
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm install
- name: Bootstrap
run: npm run bootstrap
- name: Compile
run: npm run build
- name: npm test
2023-08-29 14:56:32 +00:00
run: npm test -- --runInBand --forceExit
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Lint
run: npm run lint
- name: Format
run: npm run format-check