-
-
Notifications
You must be signed in to change notification settings - Fork 4
E2e test fw lite #1866
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
E2e test fw lite #1866
Conversation
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
# Conflicts: # .github/workflows/fw-lite.yaml
UI unit Tests 1 files ± 0 42 suites +39 24s ⏱️ +24s For more details on these failures, see this check. Results for commit e1166d3. ± Comparison against base commit 9b3e191. This pull request removes 10 and adds 101 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
# Conflicts: # frontend/viewer/src/home/Server.svelte # frontend/viewer/tests/snapshots/playwright.config.ts
…ial errors on startup.
…red shutdown support
name: E2E Tests | ||
needs: [publish-linux] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- uses: actions/download-artifact@v4 | ||
id: download-artifact | ||
with: | ||
name: fw-lite-web-linux | ||
path: fw-lite-web-linux | ||
- name: set execute permissions | ||
run: chmod +x ${{ steps.download-artifact.outputs.download-path }}/*/FwLiteWeb | ||
- name: Install Task | ||
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 #v2 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | ||
with: | ||
package_json_file: 'frontend/package.json' | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: './frontend/package.json' | ||
cache: 'pnpm' | ||
cache-dependency-path: './frontend/pnpm-lock.yaml' | ||
- name: Prepare frontend | ||
working-directory: frontend | ||
run: | | ||
pnpm install | ||
- name: Test fw lite launcher | ||
working-directory: frontend/viewer | ||
env: | ||
FW_LITE_BINARY_PATH: ${{ steps.download-artifact.outputs.download-path }}/release_linux-x64/FwLiteWeb | ||
run: task e2e-test-helper-unit-tests | ||
|
||
- uses: ./.github/actions/setup-k8s | ||
with: | ||
lexbox-api-tag: develop | ||
ingress-controller-port: '6579' # todo, figure out if we can use https as it's required for the tests | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set up Playwright dependencies | ||
working-directory: frontend/viewer | ||
run: pnpm exec playwright install --with-deps | ||
|
||
- name: Run E2E tests | ||
working-directory: frontend/viewer | ||
env: | ||
FW_LITE_BINARY_PATH: ${{ steps.download-artifact.outputs.download-path }}/release_linux-x64/FwLiteWeb | ||
TEST_SERVER_PORT: 6579 | ||
run: task test:e2e | ||
|
||
- name: Upload Playwright test results and traces (on failure) | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: fw-lite-e2e-test-results | ||
if-no-files-found: ignore | ||
path: | | ||
frontend/viewer/tests/e2e/test-results/ |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 8 days ago
To fix the identified problem, add an explicit permissions
block to the workflow, to ensure the GITHUB_TOKEN used by the job is limited to the least privileges necessary. For e2e-test
, none of the shown steps perform actions that modify repository data, so contents: read
is sufficient.
The best way to implement this is to add a permissions
block with contents: read
to the e2e-test
job in .github/workflows/fw-lite.yaml
, immediately under the job name or any existing needs
, runs-on
, or timeout-minutes
keys (inside the e2e-test:
job definition).
-
Copy modified lines R411-R412
@@ -408,6 +408,8 @@ | ||
|
||
e2e-test: | ||
name: E2E Tests | ||
permissions: | ||
contents: read | ||
needs: [publish-linux] | ||
runs-on: ubuntu-latest | ||
steps: |
I started working on this with Kiro, but then ditched it as it was going in the wrong direction and creating a bunch of fluff