mirror of
https://github.com/wagoid/commitlint-github-action.git
synced 2025-11-08 08:26:55 +00:00
ci: run npm ci to install and ignore scripts
`npm ci` is meant to be used in CI environments and the scripts are ignored to prevent e.g. Husky from being installed in the CI environment. See https://docs.npmjs.com/cli/v7/commands/npm-ci.
This commit is contained in:
parent
dbaa380ea6
commit
da65807671
2 changed files with 4 additions and 4 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
|
@ -18,7 +18,7 @@ jobs:
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-node-
|
${{ runner.os }}-node-
|
||||||
- run: npm install
|
- run: npm ci --ignore-scripts
|
||||||
- run: npm run lint
|
- run: npm run lint
|
||||||
- run: npm test -- --ci --coverage
|
- run: npm test -- --ci --coverage
|
||||||
release:
|
release:
|
||||||
|
|
@ -42,7 +42,7 @@ jobs:
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-node-
|
${{ runner.os }}-node-
|
||||||
- run: npm install
|
- run: npm ci --ignore-scripts
|
||||||
- name: Configure git user
|
- name: Configure git user
|
||||||
run: |
|
run: |
|
||||||
git config user.email 'github-action@users.noreply.github.com'
|
git config user.email 'github-action@users.noreply.github.com'
|
||||||
|
|
|
||||||
4
.github/workflows/commitlint.yml
vendored
4
.github/workflows/commitlint.yml
vendored
|
|
@ -21,7 +21,7 @@ jobs:
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-node-
|
${{ runner.os }}-node-
|
||||||
- run: npm install
|
- run: npm ci --ignore-scripts
|
||||||
- uses: ./
|
- uses: ./
|
||||||
id: run_commitlint
|
id: run_commitlint
|
||||||
env:
|
env:
|
||||||
|
|
@ -46,7 +46,7 @@ jobs:
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-node-
|
${{ runner.os }}-node-
|
||||||
- run: npm install
|
- run: npm ci --ignore-scripts
|
||||||
- uses: ./
|
- uses: ./
|
||||||
env:
|
env:
|
||||||
NODE_PATH: ${{ github.workspace }}/node_modules
|
NODE_PATH: ${{ github.workspace }}/node_modules
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue