diff --git a/.github/workflows/node-js-ci.yml b/.github/workflows/node-js-ci.yml index 8ce51f933c..da86a9cfa0 100644 --- a/.github/workflows/node-js-ci.yml +++ b/.github/workflows/node-js-ci.yml @@ -19,12 +19,36 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- - - name: Build + - name: Test uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - run: npm install - run: cp env.example .env - - run: npm run test-ci + - run: npm run test + Prettier-Check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + - run: npm install && npm run prettier-check + Lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + - run: npm install && npm run eslint