From 3c7604eae1987e8953e284a345d876f948e3f5ca Mon Sep 17 00:00:00 2001 From: jcallison1 <152124968+jcallison1@users.noreply.github.com> Date: Fri, 27 Sep 2024 20:33:38 -0500 Subject: [PATCH] Add eslint and disable jest tests for now --- .github/workflows/{run-tests.yml => ci.yml} | 22 +++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) rename .github/workflows/{run-tests.yml => ci.yml} (60%) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/ci.yml similarity index 60% rename from .github/workflows/run-tests.yml rename to .github/workflows/ci.yml index 66be2ec9a..4dc6eb5d9 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Run Tests +name: CI on: [push, pull_request] @@ -13,7 +13,9 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: "20.x" + node-version: 20 + cache: 'npm' + cache-dependency-path: FrontEndReact/package-lock.json - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -21,6 +23,8 @@ jobs: - name: Build backend run: docker compose build backend + # TODO: Run pytests here + - name: Start backend run: | docker compose up --no-build -d backend @@ -32,9 +36,15 @@ jobs: cd FrontEndReact npm install - - name: Run Jest tests + - name: Run ESLint run: | cd FrontEndReact - npm test - env: - REACT_APP_API_URL: 'http://127.0.0.1:5050/api' + npx eslint --max-warnings=0 . + + # TODO: Fix Jest tests so that they work on CI + # - name: Run Jest tests + # run: | + # cd FrontEndReact + # npm test + # env: + # REACT_APP_API_URL: 'http://127.0.0.1:5050/api'