Skip to content

Commit

Permalink
chore: improve ci script
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed May 9, 2022
1 parent 35ce990 commit bd08bc0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
branches: [main, next]
paths-ignore: ["**.md"]

concurrency:
group: "${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
format:
runs-on: ubuntu-latest
Expand All @@ -17,9 +21,9 @@ jobs:
with:
ref: ${{ github.head_ref }}
- name: Use node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci
Expand All @@ -35,16 +39,17 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test:
runs-on: ${{ matrix.os }}
name: "test: node@${{ matrix.node }} (${{ matrix.os }})"
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
node: [14.x, 16.x]
node: [14, 16, 18]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use node@${{ matrix.node }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: npm
Expand All @@ -62,7 +67,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: npm
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"test": "npm run mocha -- --watch",
"test:inspect": "npm test -- --inspect",
"test:update": "npm run mocha -- --update",
"version": "changeset version"
"version": "changeset version && npm i --package-lock-only"
},
"types": "dist/index.d.ts"
}

0 comments on commit bd08bc0

Please sign in to comment.