Skip to content

Commit

Permalink
Fix and restructure github ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Basssiiie committed Nov 23, 2024
1 parent 68adbb1 commit e18cc3c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,38 @@ on:
- main

jobs:
lint:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci --prefer-offline --no-audit --no-save
- run: npm run lint
- run: npm run build # includes linting

test:
needs: lint
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci --prefer-offline --no-audit --no-save
- run: npm run install:test-setup
- run: npm run build
- run: npm run test

examples:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci --prefer-offline --no-audit --no-save
- run: npm run install:examples
- run: npm run build
- run: npm run build:examples
- run: npm run install:test-setup
- run: npm run test
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"build:dev": "npm run clean && rollup --config rollup.config.js",
"build:examples": "npm run for:examples --action=\"run build\"",
"install:examples": "npm run for:examples --action=\"install --prefer-offline\"",
"install:test-setup": "npm install --prefix ./tests/package/project --prefer-offline --no-audit --no-save",
"install:test-setup": "npm install --prefix ./tests/package/project --prefer-offline",
"install:all": "npm run for:all --action=\"install --prefer-offline\"",
"lint": "eslint",
"test": "nyc ava",
Expand Down

0 comments on commit e18cc3c

Please sign in to comment.