Skip to content

Commit c47675a

Browse files
authored
CIのワークフローを設定 (#42)
* CIのワークフローを設定 * rollup-plugin-typescript2でnode18で不具合があったのでアップグレード * npm ci で動かない原因の箇所をアップグレード * node18を除く
1 parent 5eda89b commit c47675a

File tree

4 files changed

+10133
-932
lines changed

4 files changed

+10133
-932
lines changed

.eslintrc.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
module.exports = {
22
parser: '@typescript-eslint/parser',
3-
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
3+
extends: [
4+
'eslint:recommended',
5+
'plugin:@typescript-eslint/recommended',
6+
'prettier',
7+
],
48
rules: {
59
'@typescript-eslint/explicit-function-return-type': 'off',
610
'@typescript-eslint/no-explicit-any': 'off',

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: ['main']
9+
pull_request:
10+
branches: ['main']
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
matrix:
18+
# Node18はmswがUndiciというnode内部で用いられているfetchをインターセプトできないため一旦除いている
19+
node-version: [14.x, 16.x]
20+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21+
22+
steps:
23+
- uses: actions/checkout@v3
24+
- name: Use Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: 'npm'
29+
- run: npm ci
30+
- run: npm run build
31+
- run: npm test

0 commit comments

Comments
 (0)