From dcdbb7be8b019731ec9fb15a4ff9453049e7fd71 Mon Sep 17 00:00:00 2001 From: Adam Stachowicz Date: Tue, 26 Apr 2022 01:57:49 +0200 Subject: [PATCH 1/2] Use separate job for linters --- .github/workflows/auto-test.yml | 16 +++++++++++++++- package.json | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-test.yml b/.github/workflows/auto-test.yml index ea7fd79c9..69ef622e8 100644 --- a/.github/workflows/auto-test.yml +++ b/.github/workflows/auto-test.yml @@ -24,7 +24,7 @@ jobs: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} cache: 'npm' @@ -34,3 +34,17 @@ jobs: env: HEADLESS_TEST: 1 JUST_FOR_TEST: ${{ secrets.JUST_FOR_TEST }} + check-linters: + runs-on: ubuntu-latest + + steps: + - run: git config --global core.autocrlf false # Mainly for Windows + - uses: actions/checkout@v3 + + - name: Use Node.js LTS + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'npm' + - run: npm run install-legacy + - run: npm run lint diff --git a/package.json b/package.json index 8a8bd1ebd..937d932d8 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "start-server": "node server/server.js", "start-server-dev": "cross-env NODE_ENV=development node server/server.js", "build": "vite build --config ./config/vite.config.js", - "test": "npm run lint && node test/prepare-test-server.js && node server/server.js --port=3002 --data-dir=./data/test/ --test", + "test": "node test/prepare-test-server.js && node server/server.js --port=3002 --data-dir=./data/test/ --test", "test-with-build": "npm run build && npm test", "jest": "node test/prepare-jest.js && npm run jest-frontend && npm run jest-backend", "jest-frontend": "cross-env TEST_FRONTEND=1 jest --config=./config/jest-frontend.config.js", From 3019d5dd6462a3d73886c0573cb670b610d1c15c Mon Sep 17 00:00:00 2001 From: Adam Stachowicz Date: Tue, 26 Apr 2022 02:03:47 +0200 Subject: [PATCH 2/2] Shorter node matrix --- .github/workflows/auto-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/auto-test.yml b/.github/workflows/auto-test.yml index 69ef622e8..c0efc64ad 100644 --- a/.github/workflows/auto-test.yml +++ b/.github/workflows/auto-test.yml @@ -16,17 +16,17 @@ jobs: strategy: matrix: os: [macos-latest, ubuntu-latest, windows-latest] - node-version: [14.x, 16.x, 17.x] + node: [14, 16, 17] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - run: git config --global core.autocrlf false # Mainly for Windows - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js ${{ matrix.node }} uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node-version }} + node-version: ${{ matrix.node }} cache: 'npm' - run: npm run install-legacy - run: npm run build