Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 123 additions & 0 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: smoke-test

on:
schedule:
- cron: "23 1 * * *"
workflow_dispatch:

jobs:
test-ubuntu:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18, 20, 22]

steps:
- name: Set up Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ matrix.node-version }}
- 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 @supabase/supa-mdx-lint
- name: Test linter
working-directory: test
run: npm run lint

test-macos:
runs-on: macos-latest

strategy:
matrix:
node-version: [18, 20, 22]

steps:
- name: Set up Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ matrix.node-version }}
- 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 @supabase/supa-mdx-lint
- name: Test linter
working-directory: test
run: npm run lint

test-windows:
runs-on: windows-latest

strategy:
matrix:
node-version: [18, 20, 22]

steps:
- name: Set up Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ matrix.node-version }}
- 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 @supabase/supa-mdx-lint
- name: Test linter
working-directory: test
run: npm run lint
Loading