2019-10-02 12:18:38 +00:00
name : toolkit-unit-tests
2020-01-14 16:19:06 +00:00
on :
2019-10-03 16:45:11 +00:00
push :
2019-12-26 22:00:18 +00:00
branches :
2020-07-21 15:33:05 +00:00
- main
2019-10-03 17:07:22 +00:00
paths-ignore :
- '**.md'
pull_request :
paths-ignore :
2020-01-14 16:19:06 +00:00
- '**.md'
2019-11-18 21:20:01 +00:00
2019-07-11 20:12:50 +00:00
jobs :
2019-11-18 21:20:01 +00:00
build :
name : Build
strategy :
matrix :
2024-11-01 15:59:55 +00:00
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]
2019-11-18 21:20:01 +00:00
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
2024-02-01 17:50:47 +00:00
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 }}
2024-02-01 17:50:47 +00:00
uses : actions/setup-node@v4
2019-07-11 20:12:50 +00:00
with :
2024-10-04 20:37:08 +00:00
node-version : ${{ matrix.node-version }}
2019-07-11 20:12:50 +00:00
- 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
2020-01-18 19:28:37 +00:00
env :
GITHUB_TOKEN : ${{ github.token }}
2019-07-11 20:12:50 +00:00
- name : Lint
run : npm run lint
- name : Format
run : npm run format-check