DEV Community

Junichi Takahashi
Junichi Takahashi

Posted on • Updated on

How to set up GitHub Actions for Node.js

GitHub Actions is a cool CI tool.
This article describes how to set up GitHub Actions for Node.js

Settings

# .github/workflows/main.yml

name: Run lint and test
on: [push]
jobs:
  Run-lint-and-test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2
        with:
          node-version: "18"
          cache: "npm"
      - run: |
          npm install
          npm run lint
          npm run test
Enter fullscreen mode Exit fullscreen mode

Top comments (0)