Skip to content

Commit

Permalink
update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak committed Oct 31, 2023
1 parent b733613 commit 4daf909
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 13 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/browser-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ jobs:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'run-browser-test')
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- name: 'Cache node_modules'
uses: actions/cache@v3
with:
Expand Down
32 changes: 21 additions & 11 deletions .github/workflows/mocha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ jobs:
- name: Check event pull_request
if: github.event_name == 'pull_request'
run: 'echo pull_request: run workflow'
- uses: actions/checkout@v3
- uses: actions/checkout@v4
if: github.event_name == 'push'
with:
persist-credentials: false
- name: Check event push
id: findPr
if: github.event_name == 'push'
Expand All @@ -48,8 +50,10 @@ jobs:
- 20
- 21
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: '${{ matrix.node }}'
- run: npm install --production
Expand All @@ -60,10 +64,12 @@ jobs:
runs-on: ubuntu-latest
needs: smoke
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: 'Cache node_modules'
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -97,10 +103,12 @@ jobs:
env:
COVERAGE: 1
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '${{ matrix.node }}'
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Get npm cache directory in Windows
id: npm-cache
if: ${{ matrix.os == 'windows-2019' }}
Expand Down Expand Up @@ -141,19 +149,21 @@ jobs:
# Don't run forked 'pull_request' without saucelabs token
if: github.event_name == 'push' || !github.event.pull_request.head.repo.fork
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: 'Cache node_modules'
uses: actions/cache@v3
with:
path: '~/.npm'
# this key is different than above, since we are running scripts
# (builds, postinstall lifecycle hooks, etc.)
key: "ubuntu-latest-node-full-v16-${{ hashFiles('**/package-lock.json') }}"
key: "ubuntu-latest-node-full-lts-${{ hashFiles('**/package-lock.json') }}"
restore-keys: |
ubuntu-latest-node-full-v16-
ubuntu-latest-node-full-lts-
- name: Install Dependencies
run: npm ci
- name: Run Browser Tests
Expand Down

0 comments on commit 4daf909

Please sign in to comment.