Skip to content

Commit

Permalink
Update template CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Aug 15, 2023
1 parent cd3d8d1 commit 7bdd333
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: 20
cache: yarn
cache: pnpm
- name: Install all dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Run tests
Expand Down
19 changes: 10 additions & 9 deletions template/.github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Test
on:
push:
- main
pull_request:
env:
FORCE_COLOR: 2
permissions:
contents: read
jobs:
full:
name: Node.js 15 Full
Expand All @@ -14,19 +15,18 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: 15
node-version: 20
cache: npm
- name: Install dependencies
uses: bahmutov/npm-install@v1
run: npm ci --ignore-scripts
- name: Run tests
run: yarn test
short:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 14
- 12
- 10
- 18
name: Node.js ${{ matrix.node-version }} Quick
steps:
- name: Checkout the repository
Expand All @@ -35,7 +35,8 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
uses: bahmutov/npm-install@v1
run: npm ci --ignore-scripts
- name: Run unit tests
run: npx jest
run: npm run unit
1 change: 0 additions & 1 deletion template/.t.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package-lock.json
yarn.lock

*.test.js
.travis.yml
.github
.editorconfig
coverage/
3 changes: 2 additions & 1 deletion template/package.t.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "PostCSS plugin ${description}",
"keywords": ["postcss", "css", "postcss-plugin", "${pluginName}"],
"scripts": {
"test": "uvu . '\\.test\\.js$' && eslint ."
"unit": "uvu . '\\.test\\.js$'",
"test": "npm run unit && eslint ."
},
"author": "${authorName} <${authorEmail}>",
"license": "MIT",
Expand Down

0 comments on commit 7bdd333

Please sign in to comment.