From 90e4ecc096cb0525aaf1a4bf18f17d10884fb023 Mon Sep 17 00:00:00 2001 From: Stuart Clark Date: Tue, 6 Sep 2022 08:58:52 +1000 Subject: [PATCH] chore(#439): fix frontend tests (#444) * chore(#439): update frontend tests * chore(#439): fix eslint * chore(#439): fix cypress tests --- .github/workflows/ci.yml | 13 +++++++------ .eslintrc.js => nuxt/.eslintrc.js | 0 nuxt/package.json | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) rename .eslintrc.js => nuxt/.eslintrc.js (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e868fb14..e6d39dcd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - node: [14] + node: [16] steps: - name: Checkout ๐Ÿ›Ž @@ -43,20 +43,21 @@ jobs: ${{ runner.os }}-node- - name: Install dependencies ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป - run: npm ci --prefer-offline --no-audit --legacy-peer-deps + run: cd nuxt && yarn install - name: Run linter ๐Ÿ‘€ - run: npm run lint + run: cd nuxt && yarn lint - name: Run tests ๐Ÿงช - run: npm run test + # @TODO - Update to use a local (CI) backend instead of production. + run: cd nuxt && BASE_URL=https://demo-api.druxtjs.org yarn test - uses: actions/upload-artifact@v3 with: name: cypress-videos - path: cypress/videos + path: nuxt/cypress/videos - uses: actions/upload-artifact@v3 if: failure() with: name: cypress-screenshots - path: cypress/screenshots + path: nuxt/cypress/screenshots diff --git a/.eslintrc.js b/nuxt/.eslintrc.js similarity index 100% rename from .eslintrc.js rename to nuxt/.eslintrc.js diff --git a/nuxt/package.json b/nuxt/package.json index ef155ae4..e7d1660b 100644 --- a/nuxt/package.json +++ b/nuxt/package.json @@ -8,8 +8,8 @@ "cy:run": "cypress run", "dev": "nuxt", "generate": "nuxt generate", - "lint:js": "eslint --ext .js,.vue --ignore-path .gitignore .", - "lint:style": "stylelint **/*.{vue,css} --ignore-path .gitignore", + "lint:js": "eslint --ext .js,.vue --ignore-path ../.gitignore .", + "lint:style": "stylelint **/*.{vue,css} --ignore-path ../.gitignore", "lint": "npm run lint:js && npm run lint:style", "lintfix": "prettier --write --list-different . && npm run lint:js -- --fix && npm run lint:style -- --fix", "serve": "npm run generate && npm start",