File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,24 +17,27 @@ jobs:
1717 pre-commit :
1818 runs-on : ubuntu-latest
1919 steps :
20- - uses : actions/checkout@v3
20+ - uses : actions/checkout@v3.0.2
2121 - uses : actions/setup-python@v3.1.2
2222 - uses : pre-commit/action@v3.0.0
2323
24- local- test :
24+ test :
2525 needs : pre-commit
26- runs-on : ubuntu-latest
26+ runs-on : ${{ matrix.runs-on }}
27+ env :
28+ NPM_CONFIG_AUDIT : false
29+ NPM_CONFIG_FUND : false
30+ NPM_CONFIG_SEND_METRICS : false
31+ NPM_CONFIG_UPDATE_NOTIFIER : false
2732 steps :
28- - uses : actions/checkout@v3
33+ - uses : actions/checkout@v3.0.2
2934 - name : Test problem matcher
3035 id : expect-failure
3136 uses : ./
3237 with :
3338 config : .markdownlintrc
3439 files : .
3540 rules : examples/rules/custom.js
36- env :
37- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3841 continue-on-error : true
3942 - if : ${{ steps.expect-failure.outcome != 'failure' }}
4043 run : |
@@ -46,14 +49,22 @@ jobs:
4649 files : .
4750 ignore : examples/ignore/*
4851 rules : examples/rules/custom.js
49- env :
50- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5152 - name : Test ignore_path
5253 uses : ./
5354 with :
5455 config : .markdownlintrc
5556 files : .
5657 ignore-path : examples/.markdownlintignore
5758 rules : examples/rules/custom.js
58- env :
59- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
59+ strategy :
60+ matrix :
61+ runs-on :
62+ # - macos-10.15
63+ # - macos-11
64+ # - macos-12
65+ # - ubuntu-18.04
66+ # - ubuntu-20.04
67+ # - ubuntu-22.04
68+ # - windows-2016
69+ # - windows-2019
70+ - windows-2022
Original file line number Diff line number Diff line change @@ -54,13 +54,22 @@ runs:
5454 version="$(npm view --json markdownlint-cli@${INPUT_CLI_VERSION:?} | jq -r .version)"
5555 major_version="$(cut -d . -f 1 <<<"${version}")"
5656 minor_version="$(cut -d . -f 2 <<<"${version}")"
57- prefix="${RUNNER_TOOL_CACHE:-${RUNNER_TEMP:?}}/markdownlint-cli/${version}"
57+ if [[ "${RUNNER_OS:?}" == Windows ]]; then
58+ prefix="${RUNNER_TOOL_CACHE:-${RUNNER_TEMP:?}}/markdownlint-cli/${version}"
59+ else
60+ prefix="${RUNNER_TOOL_CACHE:-${RUNNER_TEMP:?}}\\markdownlint-cli\\${version}"
61+ fi
5862 mkdir -p "${prefix}"
5963 # FIXME: --global and --production are deprecated
6064 NPM_CONFIG_PREFIX="${prefix}" npm install --global --production "markdownlint-cli@${version}"
65+ ls -l "${prefix}"
6166 echo '::endgroup::'
6267
63- markdownlint="${prefix}/bin/markdownlint"
68+ if [[ "${RUNNER_OS:?}" == Windows ]]; then
69+ markdownlint="${prefix}\\bin\\markdownlint.exe"
70+ else
71+ markdownlint="${prefix}/bin/markdownlint"
72+ fi
6473 markdownlint+="${INPUT_CONFIG_FILE:+ -c ${INPUT_CONFIG_FILE:?}}"
6574 if [[ ${major_version} -gt 0 ]] || [[ ${minor_version} -ge 30 ]]; then
6675 markdownlint+="${INPUT_DISABLE:+ --disable ${INPUT_DISABLE:?}}"
You can’t perform that action at this time.
0 commit comments