Skip to content

Commit 466328f

Browse files
authored
Merge pull request #1062 from ecomfe/release
chore: merge release to master after releasing 5.5.0
2 parents dbf1bd5 + 223035d commit 466328f

20 files changed

+365
-86
lines changed

.github/workflows/ci.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Node CI
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize]
6+
7+
concurrency:
8+
# Note that the `teardown-pr-preview` workflow needs the same group name
9+
# to cancel the running `ci` workflows
10+
group: ${{ github.workflow }}-${{ github.event.number }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
lint:
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [18.x]
20+
21+
steps:
22+
- name: Fetch commit count
23+
env:
24+
PR_COMMIT_COUNT: ${{ github.event.pull_request.commits }}
25+
run: |
26+
echo "FETCH_DEPTH=$(($PR_COMMIT_COUNT + 1))" >> $GITHUB_ENV
27+
28+
- uses: actions/checkout@v4
29+
with:
30+
fetch-depth: ${{ env.FETCH_DEPTH }}
31+
32+
- name: Use Node.js ${{ matrix.node-version }}
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: ${{ matrix.node-version }}
36+
37+
- name: Cache node modules
38+
id: cache-dep
39+
uses: actions/cache@v3
40+
env:
41+
cache-name: cache-node-modules
42+
with:
43+
path: node_modules
44+
key: ${{ runner.os }}-lint-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
45+
46+
- name: Install dependencies
47+
if: steps.cache-dep.outputs.cache-hit != 'true'
48+
run: npm ci
49+
50+
- name: Collect changed files
51+
run: |
52+
mkdir ~/tmp/
53+
git diff ${{ github.event.pull_request.base.sha }} ${{ github.sha }} --diff-filter=ACM --name-only --relative '*src/**/*.ts' > ~/tmp/changed_files
54+
echo -e "Changed files: \n$(cat ~/tmp/changed_files)"
55+
56+
- name: Lint
57+
run: npx eslint $(cat ~/tmp/changed_files)
58+
59+
build:
60+
runs-on: ubuntu-latest
61+
62+
strategy:
63+
matrix:
64+
node-version: [18.x]
65+
66+
steps:
67+
- uses: actions/checkout@v4
68+
69+
- name: Use Node.js ${{ matrix.node-version }}
70+
uses: actions/setup-node@v4
71+
with:
72+
node-version: ${{ matrix.node-version }}
73+
74+
- name: Cache node modules
75+
id: cache-dep
76+
uses: actions/cache@v3
77+
env:
78+
cache-name: cache-node-modules
79+
with:
80+
path: node_modules
81+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
82+
83+
- name: Install dependencies
84+
if: steps.cache-dep.outputs.cache-hit != 'true'
85+
run: npm ci
86+
87+
- name: Unit Test
88+
run: npm run test
89+
90+
- name: Build release
91+
run: npm run release

.github/workflows/nightly-next.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
node-version: [16.x]
1818

1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
with:
2222
ref: next
2323

2424
- name: Use Node.js ${{ matrix.node-version }}
25-
uses: actions/setup-node@v3
25+
uses: actions/setup-node@v4
2626
with:
2727
registry-url: https://registry.npmjs.org/
2828
- name: Setup and publish nightly

.github/workflows/nightly.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
node-version: [16.x]
1818

1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
- name: Use Node.js ${{ matrix.node-version }}
22-
uses: actions/setup-node@v3
22+
uses: actions/setup-node@v4
2323
with:
2424
registry-url: https://registry.npmjs.org/
2525
- name: Setup and publish nightly

.travis.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ZRender
33

44
A lightweight graphic library which provides 2d draw for [Apache ECharts](https://github.com/apache/echarts).
55

6-
[![Build Status](https://travis-ci.com/ecomfe/zrender.svg?branch=master)](https://travis-ci.com/ecomfe/zrender) [![](https://img.shields.io/npm/dw/zrender.svg?label=npm%20downloads&style=flat)](https://www.npmjs.com/package/zrender) ![Commits Since 4.0.0](https://img.shields.io/github/commits-since/ecomfe/zrender/4.0.0.svg?colorB=%234c1&style=flat)
6+
[![](https://img.shields.io/github/actions/workflow/status/ecomfe/zrender/ci.yml)]() [![](https://img.shields.io/npm/dw/zrender.svg?label=npm%20downloads&style=flat)](https://www.npmjs.com/package/zrender) ![Commits Since 4.0.0](https://img.shields.io/github/commits-since/ecomfe/zrender/4.0.0.svg?colorB=%234c1&style=flat)
77

88
## Documentation
99

0 commit comments

Comments
 (0)