From 40346e93408591486a53a3c5f995b6fd8b7ed10e Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Mon, 4 Jul 2022 19:56:29 +0900 Subject: [PATCH] Run test and linter in CI --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9ae8071 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI + +on: + push: + branches: + - main + paths-ignore: + - '**.md' + pull_request: + paths-ignore: + - '**.md' + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + cache: npm + - name: Install dependencies + run: npm ci --ignore-scripts + - name: Test + run: | + npm test + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + cache: npm + - name: Install dependencies + run: npm ci --ignore-scripts + - name: Check format + run: | + npm run format-check + - name: Lint + run: | + npm run lint