summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-07-30 12:56:31 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-07-30 12:56:31 +0900
commit2ffff0fa618ece5bec901f1ba59a284d426b1fad (patch)
tree5b8f5283fa1a5942668354076cbfd6db7b9cf16f /.github/workflows
parentUpdate .eslintrc.js (diff)
downloadmisskey-2ffff0fa618ece5bec901f1ba59a284d426b1fad.tar.gz
misskey-2ffff0fa618ece5bec901f1ba59a284d426b1fad.tar.bz2
misskey-2ffff0fa618ece5bec901f1ba59a284d426b1fad.zip
ci: use `npm ci` to improve CI performance
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/lint.yml30
-rw-r--r--.github/workflows/test.yml44
2 files changed, 49 insertions, 25 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index ff8a1c4535..cdf6d202e0 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -8,13 +8,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- - name: Checkout
- uses: actions/checkout@v2
- - name: Setup Node.js
- uses: actions/setup-node@v1
- with:
- node-version: 16.x
- - name: Install
- run: npm i
- - name: Lint
- run: npm run lint
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v1
+ with:
+ node-version: 16.5.0
+
+ - name: Cache dependencies
+ uses: actions/cache@v2
+ with:
+ path: ~/.npm
+ key: npm-${{ hashFiles('package-lock.json') }}
+ restore-keys: npm-
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Lint
+ run: npm run lint
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 630ee1cf59..75d38af78a 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -16,21 +16,35 @@ jobs:
strategy:
matrix:
- node-version: [16.x]
+ node-version: [16.5.0]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- - name: Checkout
- uses: actions/checkout@v2
- - name: Setup Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v1
- with:
- node-version: ${{ matrix.node-version }}
- - name: Install
- run: npm i
- - name: Build
- run: npm run build
- - name: Test
- run: npm run test
- - name: Upload Coverage
- uses: codecov/codecov-action@v1
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Setup Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+
+ - name: Cache dependencies
+ uses: actions/cache@v2
+ with:
+ path: ~/.npm
+ key: npm-${{ hashFiles('package-lock.json') }}
+ restore-keys: npm-
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Build
+ run: npm run build
+
+ - name: Test
+ run: npm test
+ env:
+ CI: true
+
+ - name: Upload Coverage
+ uses: codecov/codecov-action@v1