Skip to content

ci: run smoke tests to check published packages work #1

ci: run smoke tests to check published packages work

ci: run smoke tests to check published packages work #1

Workflow file for this run

name: smoke-test
on:
push:
branches: ["ci/smoke-test"]
jobs:
test-ubuntu:
runs-on: ubuntu-latest
steps:
- name: Set up Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
- name: Create test directory
run: mkdir test
- name: Create package.json
working-directory: test
run: |
cat <<EOF > package.json
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"lint": "supa-mdx-lint --version"
},
"keywords": [],
"author": "",
"license": "ISC"
}
EOF
- name: Install supa-mdx-lint
working-directory: test
run: npm install supa-mdx-lint
- name: Test linter
working-directory: test
run: npm run lint
test-macos:
runs-on: macos-latest
steps:
- name: Set up Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
- name: Create test directory
run: mkdir test
- name: Create package.json
working-directory: test
run: |
cat <<EOF > package.json
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"lint": "supa-mdx-lint --version"
},
"keywords": [],
"author": "",
"license": "ISC"
}
EOF
- name: Install supa-mdx-lint
working-directory: test
run: npm install supa-mdx-lint
- name: Test linter
working-directory: test
run: npm run lint
test-windows:
runs-on: windows-latest
steps:
- name: Set up Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
- name: Create test directory
run: mkdir test
- name: Create package.json
shell: pwsh
working-directory: test
run: |
$json = @"
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"lint": "supa-mdx-lint --version"
},
"keywords": [],
"author": "",
"license": "ISC"
}
"@
$json | Out-File -FilePath package.json -Encoding utf8
- name: Install supa-mdx-lint
working-directory: test
run: npm install supa-mdx-lint
- name: Test linter
working-directory: test
run: npm run lint