Skip to content

Commit

Permalink
coverage
Browse files Browse the repository at this point in the history
Signed-off-by: Miki <[email protected]>
  • Loading branch information
AMoo-Miki committed Dec 20, 2024
1 parent 3d75833 commit 6089908
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/cypress12_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@ env:
COMMENT_SUCCESS_MSG: ':white_check_mark: Cypress test run succeeded!'
COMMENT_FAILURE_MSG: ':x: Cypress test run failed!'
LATEST_VERSION: '3.0.0'
COVERAGE: true

jobs:
cypress-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -72,15 +70,15 @@ jobs:
# v122
version: 1250586

- name: Setup Chrome (Linux)
- name: Setup Chrome
run: |
sudo rm -rf /usr/bin/google-chrome /opt/google/chrome
sudo ln -s ${{steps.download-chrome.outputs.path}}/${{steps.download-chrome.outputs.binary}} /usr/bin/google-chrome
- name: Setup chromedriver
run: node scripts/upgrade_chromedriver.js

- name: Run bootstrap (Linux)
- name: Run bootstrap
run: yarn osd bootstrap

- name: Build plugins
Expand All @@ -103,13 +101,23 @@ jobs:
run: sleep 60s
shell: bash

- name: Run cypress@12 tests
run: yarn test:cypress12
- name: Run tests
run: yarn test:cypress:coverage

- name: Upload Code Coverage
- name: Upload coverage
id: upload-code-coverage
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage
flags: cypress12

- name: Upload test artifacts
uses: actions/upload-artifact@v4
with:
name: cypress-artifacts
path: |
cypress/screenshots
cypress/videos
coverage
retention-days: 1
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@
"test:ftr": "scripts/use_node scripts/functional_tests",
"test:ftr:server": "scripts/use_node scripts/functional_tests_server",
"test:ftr:runner": "scripts/use_node scripts/functional_test_runner",
"test:cypress12": "env TZ=America/Los_Angeles NO_COLOR=1 yarn cypress run",
"test:cypress": "env TZ=America/Los_Angeles NO_COLOR=1 yarn cypress run",
"test:cypress:open": "env TZ=America/Los_Angeles NO_COLOR=1 yarn cypress open",
"test:cypress:coverage": "env TZ=America/Los_Angeles NO_COLOR=1 COVERAGE=1 yarn cypress run",
"checkLicenses": "scripts/use_node scripts/check_licenses --dev",
"notice:validate": "scripts/use_node scripts/notice --validate",
"notice:generate": "scripts/use_node scripts/notice",
Expand Down

0 comments on commit 6089908

Please sign in to comment.