47 lines
933 B
YAML
47 lines
933 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
lint-and-test:
|
|
runs-on: ubuntu-latest
|
|
name: Lint and Test
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 9
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Check JavaScript Syntax
|
|
run: |
|
|
echo "🔍 Checking JavaScript syntax..."
|
|
node -c index.js
|
|
echo "✅ All JavaScript files have valid syntax"
|
|
|
|
- name: Run Tests
|
|
run: |
|
|
echo "🧪 Running test suite..."
|
|
pnpm test
|
|
|
|
- name: Test Action Execution
|
|
uses: ./
|
|
with:
|
|
files: 'examples/*'
|
|
algorithm: 'sha256'
|