From 93a5db197ca32990131bf41becf2e002bb0841bf Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 2 Mar 2021 16:03:10 +0200 Subject: [PATCH] Update CI config (#1397) * separate lint step to a new job and run it only once * add caching --- .github/workflows/main.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6e58634d..8720f41b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,7 @@ name: CI env: FORCE_COLOR: 2 + NODE: 14 on: push: branches: @@ -9,6 +10,25 @@ on: branches: - master jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: ${{ env.NODE }} + - name: Set up npm cache + uses: actions/cache@v2 + with: + path: | + ~/.npm + ~/.cache/ms-playwright + key: ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package-lock.json') }} + - run: npm ci + - run: npm run lint test: name: Node.js ${{ matrix.node-version }} runs-on: ubuntu-latest @@ -25,7 +45,15 @@ jobs: - uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} + - name: Set up npm cache + uses: actions/cache@v2 + with: + path: | + ~/.npm + ~/.cache/ms-playwright + key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }} - run: npm ci - run: npm test - run: npm run test-browser - - run: npm run lint