Skip to content

Commit

Permalink
Improved workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sergii-nosachenko committed Jan 23, 2024
1 parent f9f728e commit d006976
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/lintTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,27 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3

- name: Set up Node.js from .nvmrc or use the matrix version
run: |
NVM_DIR="$HOME/.nvm"
source "$NVM_DIR/nvm.sh"
if [ -f .nvmrc ]; then
nvm install
nvm use
else
nvm install ${{ matrix.node-version }}
nvm use ${{ matrix.node-version }}
fi
shell: bash

- name: Cache Node.js modules
uses: actions/cache@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm ci --prefix mate-scripts
- run: npm run lint
Expand Down
1 change: 1 addition & 0 deletions jest-mochawesome-reporter/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18

0 comments on commit d006976

Please sign in to comment.