From a29c5d02938908e13c6a7a3ea8a5e69114bd0c4d Mon Sep 17 00:00:00 2001 From: Aleksandr Zaitsev Date: Tue, 23 Nov 2021 10:01:39 +0300 Subject: [PATCH] Create testandlint.yml --- .github/workflows/testandlint.yml | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/testandlint.yml diff --git a/.github/workflows/testandlint.yml b/.github/workflows/testandlint.yml new file mode 100644 index 0000000..37707df --- /dev/null +++ b/.github/workflows/testandlint.yml @@ -0,0 +1,35 @@ +name: Test and lint + +on: + push: + branches-ignore: + - 'rc-**' + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 20 + + steps: + - uses: actions/checkout@v2 + + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Prepare + run: npm install + + - name: Test + run: npm run test + + - name: ESLint + run: npm run lint