Skip to content

Commit

Permalink
Clean everything up, add spanish
Browse files Browse the repository at this point in the history
  • Loading branch information
mika-robots committed Sep 15, 2023
1 parent eb00f02 commit 90b93d7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 43 deletions.
58 changes: 16 additions & 42 deletions .github/workflows/cypress_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,25 @@ jobs:
VITE_DO_BUCKET_NAME: litefarm
NODE_ENV: development
VITE_API_URL: http://localhost:5000
CYPRESS_COVERAGE: true

- name: Install E2E packages
working-directory: packages/end-to-end
run: |
npm install
- name: Run E2E test (Spanish)
continue-on-error: true
env:
CYPRESS_RECORD_KEY: "c0685451-2bc1-404e-884e-bfd4699520b2"
CYPRESS_USER: 1
uses: cypress-io/github-action@v6
with:
working-directory: packages/end-to-end
headed: true
browser: chrome
record: true
parallel: true
group: "UI - Chrome"

- name: Run E2E test
- name: Run E2E test (English)
continue-on-error: true
env:
VITE_WEATHER_API_KEY: ${{secrets.VITE_WEATHER_API_KEY}}
VITE_ENV: development
VITE_GOOGLE_OAUTH_CLIENT_ID: ${{secrets.VITE_GOOGLE_OAUTH_CLIENT_ID}}
VITE_DO_BUCKET_NAME: litefarm
NODE_ENV: development
VITE_API_URL: http://localhost:5000
CYPRESS_RECORD_KEY: "c0685451-2bc1-404e-884e-bfd4699520b2"
CYPRESS_USER: 0
uses: cypress-io/github-action@v6
Expand All @@ -100,36 +104,6 @@ jobs:
name: logs
path: packages/api/logs

- name: Find coverage file
working-directory: "."
run: |
FILE_NAME="coverage-summary.json"
FOUND_PATH=$(find . -type f -name "$FILE_NAME")
if [[ ! -z "$FOUND_PATH" ]]; then
echo "File found at: $FOUND_PATH"
else
echo "File not found!"
fi
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: packages/end-to-end/coverage/coverage-summary.json

- name: Archive code coverage results webapp
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: packages/webapp/coverage/coverage-summary.json

- name: Archive code coverage results webapp
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: coverage/coverage-summary.json

- name: set code coverage badge
working-directory: "."
run: npx -p check-code-coverage update-badge --from '${GITHUB_WORKSPACE}/packages/end-to-end/coverage/coverage-summary.json'
Expand All @@ -138,7 +112,7 @@ jobs:

- name: Set code coverage commit status
continue-on-error: true
working-directory: packages/webapp
working-directory: packages/end-to-end
run: npx set-gh-status
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Expand Down
2 changes: 1 addition & 1 deletion packages/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "LiteFarm Web application",
"type": "module",
"scripts": {
"dev": "CYPRESS_COVERAGE=TRUE vite --host",
"dev": "vite --host",
"build": "tsc && NODE_OPTIONS=--max_old_space_size=3000 vite build",
"preview": "vite preview",
"lint": "eslint src",
Expand Down

0 comments on commit 90b93d7

Please sign in to comment.