Skip to content

Commit

Permalink
[TEST] update github action test, use checkout@v3 and setup-node@v3 w…
Browse files Browse the repository at this point in the history
…ith cache enabled (#1)
  • Loading branch information
dmh authored Jan 4, 2023
1 parent 5de9815 commit 6a438da
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 59 deletions.
41 changes: 10 additions & 31 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,21 @@ on: [push, pull_request]

jobs:

main:
name: Run tests
build:
name: Node
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

node: [16, 18]
steps:
- uses: actions/checkout@v2

- name: Set up Node.js v${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
- uses: actions/checkout@v3
- name: Setup Node.js v${{ matrix.node }}
uses: actions/setup-node@v3
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install npm@^8
run: npm install -g npm@^8

- name: Install npm dependencies
run: npm ci

- name: Run npm test
run: npm test
node-version: ${{ matrix.node }}
cache: 'npm'
- run: npm ci
- run: npm test

- name: PKG versions
run: |
Expand Down
62 changes: 37 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"simplelightbox": "~2.11.0"
},
"devDependencies": {
"@resultify/hubspot-cms-lib": "1.0.0",
"@resultify/hubspot-cms-lib": "1.0.1",
"browserslist": "~4.21.4",
"husky": "~8.0.2",
"standard": "~17.0.0",
Expand All @@ -33,8 +33,8 @@
"stylelint-no-unsupported-browser-features": "~6.0.1"
},
"engines": {
"node": ">=16.13.0",
"npm": ">=8.19.3"
"node": ">=16.13",
"npm": ">=8.19"
},
"browserslist": [
"> 1.5%"
Expand Down

0 comments on commit 6a438da

Please sign in to comment.