Skip to content
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

Fix GitHub Actions workflow #447

Merged
merged 5 commits into from
Feb 5, 2025
Merged

Conversation

rvalitov
Copy link
Contributor

@rvalitov rvalitov commented Feb 4, 2025

This PR fixes the tests workflow:

  1. Issue with main.yml that uses ubuntu-latest and error:

No usable sandbox! If you are running on Ubuntu 23.10+ or another Linux distro that has disabled unprivileged user namespaces with AppArmor, see https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md. Otherwise see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the (older) SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.

The approach is the most simple: disable the feature of AppArmor to be able to run the tests.

  1. Fixes the ava timeout message:

Timed out while running tests

  1. Fixes the cookie tests because of incorrect PNG bits per pixel processing.
  2. Adds Node.js v22 to the tests matrix.

@rvalitov
Copy link
Contributor Author

rvalitov commented Feb 4, 2025

Added timeout to ava otherwise there was a timeout error in the tests:

Timed out while running tests

@sindresorhus
Copy link
Owner

Thanks for working on this. Seems like tests are still failing.

@rvalitov
Copy link
Contributor Author

rvalitov commented Feb 5, 2025

Yes there's one more issue to fix. WIP

@rvalitov
Copy link
Contributor Author

rvalitov commented Feb 5, 2025

The problem is that now the PNG image is 24 bit. But the tests consider it to be 32 bit with alpha channel. I don't know if it was like that in the past or when this changed. The fix is easy. I will add a new commit today.

@rvalitov
Copy link
Contributor Author

rvalitov commented Feb 5, 2025

Now the PNG image is properly treated as 24 bit. And in tests I changed the black color to more complex to validate the numbers. Having all zeros for black looks too simple or a case when it's uninitialized.

@rvalitov rvalitov changed the title Fix for unprivileged user namespaces Fix GitHub Actions workflow Feb 5, 2025
@rvalitov rvalitov marked this pull request as draft February 5, 2025 07:56
@rvalitov rvalitov marked this pull request as ready for review February 5, 2025 08:00
@rvalitov
Copy link
Contributor Author

rvalitov commented Feb 5, 2025

@sindresorhus it's OK now and ready for review. If you merge this PR, then I would like to submit a new PR that updates the dependencies that are quite outdated.
Please let me know if there's any reason for not committing the package-lock.json file?

@sindresorhus
Copy link
Owner

Please let me know if there's any reason for not committing the package-lock.json file?

sindresorhus/ama#479 (comment)

@sindresorhus sindresorhus merged commit 93d7574 into sindresorhus:main Feb 5, 2025
3 checks passed
rvalitov added a commit to rvalitov/pageres that referenced this pull request Feb 5, 2025
commit 93d7574
Author: Ramil Valitov <[email protected]>
Date:   Wed Feb 5 15:15:39 2025 +0300

    Fix GitHub Actions workflow (sindresorhus#447)
@rvalitov rvalitov deleted the fix/sandbox branch February 8, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants