Skip to content

Commit

Permalink
chore: use npm ci for faster installs, and only run build once on pr …
Browse files Browse the repository at this point in the history
…sync (push)
  • Loading branch information
0x4007 committed Oct 1, 2024
1 parent 5ee489c commit a690f3b
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Build

on:
push:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:

permissions:
Expand All @@ -21,10 +21,11 @@ jobs:
with:
node-version: 20.10.0

- name: Install dependencies
run: npm ci

- name: Build
run: |
npm install
npm run build
run: npm run build

- name: Upload build artifact
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
node-version: "20.10.0"

- name: Install
run: npm install
run: npm ci

- name: Run cspell
run: npm run format:cspell
2 changes: 1 addition & 1 deletion .github/workflows/cypress-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: npm install
run: npm ci
- name: Cypress run
uses: cypress-io/github-action@v6
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
commit_sha: ${{ github.event.workflow_run.head_sha }}
workflow_run_id: ${{ github.event.workflow_run.id }}
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
app_private_key: ${{ secrets.APP_PRIVATE_KEY }}
2 changes: 1 addition & 1 deletion .github/workflows/dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
node-version: "20.10.0"

- name: Install dependencies
run: npm install
run: npm ci

- name: Run npm start
run: npm start "${{ github.event.inputs.input_string }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jest-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- name: Jest With Coverage
run: |
npm install
npm ci
npm run test
- name: Add Jest Report to Summary
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/knip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
node-version: 20.10.0

- name: Install toolchain
run: npm install
run: npm ci

- name: Store PR number
run: echo ${{ github.event.number }} > pr-number.txt
Expand Down

0 comments on commit a690f3b

Please sign in to comment.