Skip to content

Commit

Permalink
Install all packages in github ci flows
Browse files Browse the repository at this point in the history
  • Loading branch information
Basssiiie committed Nov 23, 2024
1 parent e18cc3c commit 61f03bd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,37 @@ on:
- main

jobs:
build:
lint:
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 build # includes linting
- run: npm run ci:all
- run: npm run build:prod
- run: npm run lint

test:
needs: build
needs: lint
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 ci:all
- run: npm run build
- run: npm run test

examples:
needs: build
needs: lint
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 ci:all
- run: npm run build
- run: npm run build:examples
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,24 @@
"scripts": {
"start": "npm run watch",
"watch": "nodemon --watch ./src --ext js,ts --exec \"npm run build:dev\"",
"build": "npm run clean && rollup --config rollup.config.js --environment BUILD:production && npm run lint",

"build": "npm run build:prod && npm run lint",
"build:dev": "npm run clean && rollup --config rollup.config.js",
"build:prod": "npm run clean && rollup --config rollup.config.js --environment BUILD:production",
"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",
"install:all": "npm run for:all --action=\"install --prefer-offline\"",
"ci:all": "npm run for:all --action=\"ci --prefer-offline --no-audit --no-save\"",

"lint": "eslint",
"test": "nyc ava",

"version:prerelease": "npm version prerelease --preid=prerelease",
"publish:local": "npm run build && npm install --global",
"publish:prerelease": "npm run build && release-it --prerelease=prerelease",

"clean": "node --eval \"fs.rmSync('./dist', { recursive: true, force: true })\"",
"exec": "node --eval \"var t=process.env.npm_config_target;child_process.execSync('npm '+process.env.npm_config_action+(t?(' --prefix '+t):''),{stdio: 'inherit'})\"",
"for:examples": "npm run exec --target=examples/AllWidgets && npm run exec --target=examples/BirdStalker && npm run exec --target=examples/Ratios && npm run exec --target=examples/WindowWithTabs",
Expand Down

0 comments on commit 61f03bd

Please sign in to comment.