diff --git a/.github/actions/setup-system/action.yml b/.github/actions/setup-system/action.yml index 7c6ef9541fcb..fba10941e8c1 100644 --- a/.github/actions/setup-system/action.yml +++ b/.github/actions/setup-system/action.yml @@ -58,6 +58,17 @@ runs: curl -L# 'https://github.com/rui314/mold/releases/download/v2.4.0/mold-2.4.0-x86_64-linux.tar.gz' \ | sudo tar -xzf- -C /usr/local + - name: Remove 32-bit libs and incompatible pre-installed pkgs from Runner + shell: bash + if: ${{ runner.os == 'Linux' }} + run: | + dpkg -l | grep i386 + sudo apt-get purge --allow-remove-essential libc6-i386 ".*:i386" + sudo dpkg --remove-architecture i386 + + # https://github.com/actions/runner-images/issues/9546#issuecomment-2014940361 + sudo apt-get remove libunwind-* + - name: Setup Rust and Dependencies uses: ./.github/actions/setup-rust with: @@ -83,4 +94,4 @@ runs: pushd scripts npm i --production popd - node scripts/preprep.mjs + env NODE_ENV=debug node scripts/preprep.mjs diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 165be176b904..47b20eb9df30 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,13 +68,6 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Remove 32-bit libs - if: ${{ runner.os == 'Linux' }} - run: | - dpkg -l | grep i386 - sudo apt-get purge --allow-remove-essential libc6-i386 ".*:i386" - sudo dpkg --remove-architecture i386 - - name: Install Apple API key if: ${{ runner.os == 'macOS' }} run: | diff --git a/apps/web/cypress/e2e/1-onboarding.spec.cy.ts b/apps/web/cypress/e2e/1-onboarding.spec.cy.ts index db8952e6e389..09c7dca25360 100644 --- a/apps/web/cypress/e2e/1-onboarding.spec.cy.ts +++ b/apps/web/cypress/e2e/1-onboarding.spec.cy.ts @@ -1,5 +1,12 @@ import { discordUrl, libraryName, privacyUrl } from '../fixtures/onboarding.json'; -import { libraryRegex, onboardingRegex } from '../fixtures/routes'; +import { + libraryRegex, + newLibraryRegex, + onboardingCreatingLibraryRegex, + onboardingLocationRegex, + onboardingPrivacyRegex, + onboardingRegex +} from '../fixtures/routes'; describe('Onboarding', () => { // TODO: Create debug flag to bypass auto language detection @@ -16,7 +23,7 @@ describe('Onboarding', () => { .then((url) => (onboardingRegex.test(url) ? url : cy.deleteLibrary(libraryName))); // Check redirect to initial alpha onboarding screen - cy.url().should('match', /\/onboarding\/alpha$/); + cy.url().should('match', onboardingRegex); // Check application name is present cy.get('h1').should('contain', 'Spacedrive'); @@ -41,7 +48,7 @@ describe('Onboarding', () => { .click(); // Check we were redirect to Library creation screen - cy.url().should('match', /\/onboarding\/new-library$/); + cy.url().should('match', newLibraryRegex); // Check create library screen title cy.get('h2').should('contain', 'Create a Library'); @@ -70,7 +77,7 @@ describe('Onboarding', () => { cy.get('@newLibraryButton').click(); // Check redirect to add default locations - cy.url().should('match', /\/onboarding\/locations$/); + cy.url().should('match', onboardingLocationRegex); // Check we have a Toggle All button cy.get('#toggle-all').as('toggleAllButton'); @@ -80,6 +87,11 @@ describe('Onboarding', () => { if (locations == null || typeof locations !== 'object') throw new Error('Invalid locations data'); + const locationsEntries = Object.entries(locations); + + // When there is no default locations, the UI doesn't show any buttons + if (locationsEntries.length <= 0) return; + // Check that default location checkboxes work for (const state of ['unchecked', 'checked']) { if (state === 'checked') { @@ -90,7 +102,7 @@ describe('Onboarding', () => { } // Check we have all the default locations available - for (const [location, locationName] of Object.entries(locations)) { + for (const [location, locationName] of locationsEntries) { if (typeof locationName !== 'string') throw new Error('Invalid location name'); let newState: typeof state; @@ -113,7 +125,7 @@ describe('Onboarding', () => { cy.get('button').contains('Continue').click(); // Check redirect to privacy screen - cy.url().should('match', /\/onboarding\/privacy$/); + cy.url().should('match', onboardingPrivacyRegex); // Check privacy screen title cy.get('h2').should('contain', 'Your Privacy'); @@ -133,8 +145,8 @@ describe('Onboarding', () => { // Check we have a button to finish onboarding cy.get('button[type="submit"]').contains('Continue').click(); - // Check redirect to privacy screen - cy.url().should('match', /\/onboarding\/creating-library$/); + // Check redirect to create library screen + cy.url().should('match', onboardingCreatingLibraryRegex); // FIX-ME: This fails a lot, due to the creating library screen only being show for a short time // Check creating library screen title diff --git a/apps/web/cypress/fixtures/routes.ts b/apps/web/cypress/fixtures/routes.ts index 291be1624a5a..0e78b83ab4d0 100644 --- a/apps/web/cypress/fixtures/routes.ts +++ b/apps/web/cypress/fixtures/routes.ts @@ -5,4 +5,5 @@ export const onboardingLocationRegex = /\/onboarding\/locations$/; export const onboardingPrivacyRegex = /\/onboarding\/privacy$/; export const librarySettingsRegex = /\/settings\/library\/general$/; export const onboardingLibraryRegex = /\/onboarding\/new-library$/; +export const onboardingCreatingLibraryRegex = /\/onboarding\/creating-library$/; export const locationRegex = /\/location\/1$/; diff --git a/apps/web/cypress/support/commands.ts b/apps/web/cypress/support/commands.ts index 3ba3175d74e8..5bd1380b11b6 100644 --- a/apps/web/cypress/support/commands.ts +++ b/apps/web/cypress/support/commands.ts @@ -6,6 +6,7 @@ import { onboardingLibraryRegex, onboardingLocationRegex, onboardingPrivacyRegex, + onboardingCreatingLibraryRegex, onboardingRegex } from '../fixtures/routes'; @@ -45,8 +46,12 @@ Cypress.Commands.add('fastOnboarding', (libraryName: string) => { // Privacy screen cy.url().should('match', onboardingPrivacyRegex); + cy.get('label').contains('Share the bare minimum').click(); cy.get('button[type="submit"]').contains('Continue').click(); + // Check redirect to create library screen + cy.url().should('match', onboardingCreatingLibraryRegex); + // Check redirect to Library cy.checkUrlIsLibrary(); });