chore: workflow improvement (#1989)
* Update verify.yml with setup-common-steps This commit updates the verify.yml file to include the setup-common-steps job. The setup-common-steps job is responsible for setting up the common steps required for the verify workflow. By adding this job, we ensure that the necessary setup is performed before running the verify job. The update includes the following changes: - Added the setup-common-steps job to the jobs section. - Added the needs keyword to the verify, browser-tests, node-tests, and node-tests-windows jobs, specifying that they depend on the setup-common-steps job. * Update actions/setup-node and actions/checkout versions This commit updates the versions of actions/setup-node and actions/checkout in the release.yml file. * Rename 'setup-common-steps' to 'init' in verify.yml Co-authored-by: gerjanvangeest <gerjanvangeest@users.noreply.github.com> * Update setup-node and action/checkout to v3 * Update setup-node and action/checkout to v3 and rename setup-common-steps to init --------- Co-authored-by: gerjanvangeest <gerjanvangeest@users.noreply.github.com>
This commit is contained in:
parent
bdc7455610
commit
c8052af068
2 changed files with 17 additions and 17 deletions
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
|
@ -14,13 +14,13 @@ jobs:
|
|||
steps:
|
||||
- uses: google/wireit@setup-github-actions-caching/v1
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@master
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node.js 16.x
|
||||
uses: actions/setup-node@master
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
|
|
|||
30
.github/workflows/verify.yml
vendored
30
.github/workflows/verify.yml
vendored
|
|
@ -3,18 +3,23 @@ name: Verify changes
|
|||
on: pull_request
|
||||
|
||||
jobs:
|
||||
init:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v3
|
||||
- uses: google/wireit@setup-github-actions-caching/v1
|
||||
|
||||
verify:
|
||||
name: Verify changes
|
||||
runs-on: ubuntu-latest
|
||||
needs: init
|
||||
steps:
|
||||
- uses: google/wireit@setup-github-actions-caching/v1
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Sanity check
|
||||
run: node ./scripts/lock-scan.js
|
||||
|
||||
- name: Setup Node 16.x
|
||||
uses: actions/setup-node@v1
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
|
||||
|
|
@ -30,12 +35,10 @@ jobs:
|
|||
browser-tests:
|
||||
name: Browser tests
|
||||
runs-on: ubuntu-latest
|
||||
needs: init
|
||||
steps:
|
||||
- uses: google/wireit@setup-github-actions-caching/v1
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Node 16.x
|
||||
uses: actions/setup-node@v1
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
|
||||
|
|
@ -49,17 +52,15 @@ jobs:
|
|||
|
||||
node-tests:
|
||||
name: Node tests
|
||||
needs: init
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x]
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
- uses: google/wireit@setup-github-actions-caching/v1
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Node ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
|
|
@ -78,11 +79,10 @@ jobs:
|
|||
node-version: [16.x]
|
||||
os: [windows-latest]
|
||||
steps:
|
||||
- uses: google/wireit@setup-github-actions-caching/v1
|
||||
- uses: actions/checkout@v2
|
||||
- needs: init
|
||||
|
||||
- name: Setup Node ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue