From f9bcd599b3e6dbc8d2ebc631b13e922c5d0df8c0 Mon Sep 17 00:00:00 2001 From: David Anson Date: Fri, 25 Aug 2023 20:43:42 -0700 Subject: [PATCH] Add "Smoke Test" GitHub Actions workflow to validate scenarios using the output of "npm pack". --- .github/workflows/smoke-test.yml | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/smoke-test.yml diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml new file mode 100644 index 00000000..f3d1fb37 --- /dev/null +++ b/.github/workflows/smoke-test.yml @@ -0,0 +1,34 @@ +name: Smoke Test + +on: + pull_request: + push: + branches-ignore: + - 'dependabot/**' + schedule: + - cron: '30 12 * * *' + workflow_dispatch: + +jobs: + smoke-test: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: [ macos-latest, ubuntu-latest, windows-latest ] + node-version: [ 16, 18, 20 ] + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - run: npm clean-install + - run: npm pack + - run: npm exec --yes -- cpy-cli "markdownlint-cli2-*.tgz" . --rename=markdownlint-cli2.tgz + - run: npm exec --yes -- del-cli node_modules .npmrc package.json package-lock.json npm-shrinkwrap.json + - run: npm install markdownlint-cli2.tgz + - run: node_modules/.bin/markdownlint-cli2 README.md + - run: npm clean-install + - run: node_modules/.bin/markdownlint-cli2 README.md