From 881d7ed9c31f1af780fcdd8093d5067e852843ff Mon Sep 17 00:00:00 2001 From: Robert Babaev Date: Tue, 21 Jul 2026 13:41:44 -0400 Subject: [PATCH 1/9] ci: attempt to fix broken devenv setup Signed-off-by: Robert Babaev --- .github/workflows/deploy.yml | 2 +- .github/workflows/playwright.yml | 2 +- .github/workflows/test.yml | 2 +- devenv.lock | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e2ddb6f..cddb73d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,7 +16,7 @@ on: jobs: deploy: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 defaults: run: shell: devenv-ci {0} diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 2da8793..ef812e0 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -8,7 +8,7 @@ on: jobs: test-e2e: timeout-minutes: 60 - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 defaults: run: shell: devenv-ci {0} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2df3f5a..35be57a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ on: jobs: test-vitest: timeout-minutes: 60 - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 defaults: run: shell: devenv-ci {0} diff --git a/devenv.lock b/devenv.lock index 7314a2d..1bbc096 100644 --- a/devenv.lock +++ b/devenv.lock @@ -3,11 +3,11 @@ "devenv": { "locked": { "dir": "src/modules", - "lastModified": 1783538213, - "narHash": "sha256-jNjKlmrejUrBgVAeiavlMLlkmC7ZEv1D9nhfuwMW5Q8=", + "lastModified": 1784650273, + "narHash": "sha256-H8E5N0N2TtVZa1aBup5xAIj57u5hSKMEegtzGJlMU0s=", "owner": "cachix", "repo": "devenv", - "rev": "d1fb321e73048d0e1e2b523580268ebb3df2ae90", + "rev": "8dc0eea065722488f5e127dbcc0c3f4e40bdbb2d", "type": "github" }, "original": { @@ -41,11 +41,11 @@ ] }, "locked": { - "lastModified": 1783008725, - "narHash": "sha256-jGiy6+sxjNWXSjp25uoJuNfyH9zBK1PEDY0lVoL4ibQ=", + "lastModified": 1784288435, + "narHash": "sha256-ReRHaLgr/uVqdD8afFSn+myXIfpHeOhP0yYe0TJqAA8=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "bca82caa46d5ec0f5d422c61fb1e30bc51313cbe", + "rev": "43b3c1ab9d40fb1dbb008f451988a91e375825e9", "type": "github" }, "original": { From 75f74c674f1b884a97aca91792e556dc7c33f259 Mon Sep 17 00:00:00 2001 From: Robert Babaev Date: Tue, 21 Jul 2026 13:51:17 -0400 Subject: [PATCH 2/9] fix: vite preview now goes to port 5173 Signed-off-by: Robert Babaev --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0ccb7bd..08f4491 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "dev": "vite dev", "build": "vite build", - "preview": "vite preview", + "preview": "vite preview --port 5173", "prepare": "svelte-kit sync || echo ''", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", From 47e20c3baf1f054131ed525ceee621e9ba8bfbdb Mon Sep 17 00:00:00 2001 From: Robert Babaev Date: Tue, 21 Jul 2026 13:52:28 -0400 Subject: [PATCH 3/9] fix(prettier): don't use tabs due to neovim stuff Signed-off-by: Robert Babaev --- .prettierrc | 40 +++++++------- package.json | 144 +++++++++++++++++++++++++-------------------------- 2 files changed, 92 insertions(+), 92 deletions(-) diff --git a/.prettierrc b/.prettierrc index 232f81e..313a790 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,22 +1,22 @@ { - "useTabs": true, - "singleQuote": true, - "trailingComma": "none", - "printWidth": 100, - "plugins": [ - "prettier-plugin-svelte", - "@trivago/prettier-plugin-sort-imports", - "prettier-plugin-tailwindcss" - ], - "importOrder": ["", "^[$](.*)$", "^[./]"], - "importOrderSeparation": true, - "importOrderSortSpecifiers": true, - "overrides": [ - { - "files": "*.svelte", - "options": { - "parser": "svelte" - } - } - ] + "useTabs": false, + "singleQuote": true, + "trailingComma": "none", + "printWidth": 100, + "plugins": [ + "prettier-plugin-svelte", + "@trivago/prettier-plugin-sort-imports", + "prettier-plugin-tailwindcss" + ], + "importOrder": ["", "^[$](.*)$", "^[./]"], + "importOrderSeparation": true, + "importOrderSortSpecifiers": true, + "overrides": [ + { + "files": "*.svelte", + "options": { + "parser": "svelte" + } + } + ] } diff --git a/package.json b/package.json index 08f4491..7d48c8e 100644 --- a/package.json +++ b/package.json @@ -1,74 +1,74 @@ { - "name": "robertbabaev.tech", - "private": true, - "version": "0.0.1", - "type": "module", - "scripts": { - "dev": "vite dev", - "build": "vite build", - "preview": "vite preview --port 5173", - "prepare": "svelte-kit sync || echo ''", - "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", - "format": "prettier --write .", - "lint": "prettier --check . && eslint .", - "generate-resume-data": "tsx scripts/generate_resume_data.ts && taplo fmt resume/*/data.toml", - "test": "vitest run", - "e2e": "playwright test --trace on" - }, - "devDependencies": { - "@eslint/compat": "^1.4.1", - "@eslint/js": "^9.39.4", - "@iarna/toml": "^2.2.5", - "@lucide/svelte": "^0.482.0", - "@playwright/test": "^1.61.1", - "@sveltejs/adapter-static": "^3.0.10", - "@sveltejs/kit": "^2.69.2", - "@sveltejs/vite-plugin-svelte": "^5.1.1", - "@tailwindcss/container-queries": "^0.1.1", - "@tailwindcss/typography": "^0.5.20", - "@trivago/prettier-plugin-sort-imports": "^5.2.2", - "@types/jsdom": "^21.1.7", - "@types/node": "^22.20.0", - "@types/xml2js": "^0.4.14", - "autoprefixer": "^10.5.2", - "bits-ui": "^1.8.0", - "clsx": "^2.1.1", - "dompurify": "^3.4.11", - "embla-carousel-svelte": "8.1.6", - "eslint": "^9.39.4", - "eslint-config-prettier": "^10.1.8", - "eslint-plugin-svelte": "^2.46.1", - "eslint-plugin-tailwindcss": "^3.18.3", - "globals": "^15.15.0", - "jsdom": "^26.1.0", - "marked": "^16.4.2", - "prettier": "~3.6.0", - "prettier-plugin-svelte": "^3.5.2", - "prettier-plugin-tailwindcss": "^0.6.14", - "svelte": "^5.56.4", - "svelte-adapter-static-digitalocean": "^3.0.1", - "svelte-check": "^4.7.2", - "svelte-scrolling": "^1.5.1", - "svelte-typewrite": "^3.0.0", - "tailwind-merge": "^3.6.0", - "tailwind-variants": "^0.2.1", - "tailwindcss": "^3.4.19", - "tailwindcss-animate": "^1.0.7", - "tsx": "^4.23.0", - "typescript": "^5.9.3", - "typescript-eslint": "^8.63.0", - "vite": "^6.4.3", - "vitest": "^3.2.7" - }, - "dependencies": { - "axios": "^1.18.1", - "smol-toml": "^1.7.0", - "xml2js": "^0.6.2" - }, - "pnpm": { - "onlyBuiltDependencies": [ - "esbuild" - ] - } + "name": "robertbabaev.tech", + "private": true, + "version": "0.0.1", + "type": "module", + "scripts": { + "dev": "vite dev", + "build": "vite build", + "preview": "vite preview --port 5173", + "prepare": "svelte-kit sync || echo ''", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "format": "prettier --write .", + "lint": "prettier --check . && eslint .", + "generate-resume-data": "tsx scripts/generate_resume_data.ts && taplo fmt resume/*/data.toml", + "test": "vitest run", + "e2e": "playwright test --trace on" + }, + "devDependencies": { + "@eslint/compat": "^1.4.1", + "@eslint/js": "^9.39.4", + "@iarna/toml": "^2.2.5", + "@lucide/svelte": "^0.482.0", + "@playwright/test": "^1.61.1", + "@sveltejs/adapter-static": "^3.0.10", + "@sveltejs/kit": "^2.69.2", + "@sveltejs/vite-plugin-svelte": "^5.1.1", + "@tailwindcss/container-queries": "^0.1.1", + "@tailwindcss/typography": "^0.5.20", + "@trivago/prettier-plugin-sort-imports": "^5.2.2", + "@types/jsdom": "^21.1.7", + "@types/node": "^22.20.0", + "@types/xml2js": "^0.4.14", + "autoprefixer": "^10.5.2", + "bits-ui": "^1.8.0", + "clsx": "^2.1.1", + "dompurify": "^3.4.11", + "embla-carousel-svelte": "8.1.6", + "eslint": "^9.39.4", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-svelte": "^2.46.1", + "eslint-plugin-tailwindcss": "^3.18.3", + "globals": "^15.15.0", + "jsdom": "^26.1.0", + "marked": "^16.4.2", + "prettier": "~3.6.0", + "prettier-plugin-svelte": "^3.5.2", + "prettier-plugin-tailwindcss": "^0.6.14", + "svelte": "^5.56.4", + "svelte-adapter-static-digitalocean": "^3.0.1", + "svelte-check": "^4.7.2", + "svelte-scrolling": "^1.5.1", + "svelte-typewrite": "^3.0.0", + "tailwind-merge": "^3.6.0", + "tailwind-variants": "^0.2.1", + "tailwindcss": "^3.4.19", + "tailwindcss-animate": "^1.0.7", + "tsx": "^4.23.0", + "typescript": "^5.9.3", + "typescript-eslint": "^8.63.0", + "vite": "^6.4.3", + "vitest": "^3.2.7" + }, + "dependencies": { + "axios": "^1.18.1", + "smol-toml": "^1.7.0", + "xml2js": "^0.6.2" + }, + "pnpm": { + "onlyBuiltDependencies": [ + "esbuild" + ] + } } From c641f0c889ccd515284f1add61d1af0aec15e786 Mon Sep 17 00:00:00 2001 From: Robert Babaev Date: Tue, 21 Jul 2026 14:23:39 -0400 Subject: [PATCH 4/9] fix(ci): caching + playwright webserver Signed-off-by: Robert Babaev --- .github/actions/devenv-setup/action.yml | 29 +++++- package.json | 2 +- playwright.config.ts | 122 ++++++++++++------------ 3 files changed, 90 insertions(+), 63 deletions(-) diff --git a/.github/actions/devenv-setup/action.yml b/.github/actions/devenv-setup/action.yml index bda61c3..90e245a 100644 --- a/.github/actions/devenv-setup/action.yml +++ b/.github/actions/devenv-setup/action.yml @@ -4,7 +4,34 @@ runs: using: composite steps: - uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6 - - uses: cachix/cachix-action@5f2d7c5294214f71b873db4b969586b980625e71 # v17 + with: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + extra_nix_config: | + keep-env-derivations = true + keep-outputs = true + - name: Restore and save Nix store + uses: nix-community/cache-nix-action@7df957e333c1e5da7721f60227dbba6d06080569 # v7.0.2 + with: + # restore and save a cache using this key + primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock', 'devenv.lock') }} + # if there's no cache hit, restore a cache by this prefix + restore-prefixes-first-match: nix-${{ runner.os }}- + # collect garbage until the Nix store size (in bytes) is at most this number + # before trying to save a new cache + # 1G = 1073741824 + gc-max-store-size-linux: 1G + # do purge caches + purge: true + # purge all versions of the cache + purge-prefixes: nix-${{ runner.os }}- + # created more than this number of seconds ago + purge-created: 0 + # or last accessed this duration (ISO 8601 duration format) + # before the start of the `Post Restore and save Nix store` phase + purge-last-accessed: P1DT12H + # except any version with the key that is the same as the `primary-key` + purge-primary-key: never + - uses: cachix/cachix-action@6f2d7c5294214f71b873db4b969586b980625e71 # v17 with: name: devenv - name: Configure rbabaev Cachix cache diff --git a/package.json b/package.json index 7d48c8e..a0d4f75 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "dev": "vite dev", "build": "vite build", - "preview": "vite preview --port 5173", + "preview": "vite preview --port 5173 --host", "prepare": "svelte-kit sync || echo ''", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", diff --git a/playwright.config.ts b/playwright.config.ts index 1e006b2..91c00e9 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -12,72 +12,72 @@ import { defineConfig, devices } from '@playwright/test'; * See https://playwright.dev/docs/test-configuration. */ export default defineConfig({ - timeout: 10_000, - testDir: 'e2e', - /* Run tests in files in parallel */ - fullyParallel: true, - /* Fail the build on CI if you accidentally left test.only in the source code. */ - forbidOnly: !!process.env.CI, - /* Retry on CI only */ - retries: process.env.CI ? 2 : 0, - /* Opt out of parallel tests on CI. */ - workers: process.env.CI ? 1 : undefined, - /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - reporter: 'html', - /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ - use: { - /* Base URL to use in actions like `await page.goto('/')`. */ - baseURL: 'http://localhost:5173', + timeout: 10_000, + testDir: 'e2e', + /* Run tests in files in parallel */ + fullyParallel: true, + /* Fail the build on CI if you accidentally left test.only in the source code. */ + forbidOnly: !!process.env.CI, + /* Retry on CI only */ + retries: process.env.CI ? 2 : 0, + /* Opt out of parallel tests on CI. */ + workers: process.env.CI ? 1 : undefined, + /* Reporter to use. See https://playwright.dev/docs/test-reporters */ + reporter: 'html', + /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ + use: { + /* Base URL to use in actions like `await page.goto('/')`. */ + baseURL: 'http://localhost:5173', - /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ - trace: 'on-first-retry' - }, + /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ + trace: 'on-first-retry' + }, - /* Configure projects for major browsers */ - projects: [ - { - name: 'chromium', - use: { ...devices['Desktop Chrome'] } - }, + /* Configure projects for major browsers */ + projects: [ + { + name: 'chromium', + use: { ...devices['Desktop Chrome'] } + }, - { - name: 'firefox', - use: { ...devices['Desktop Firefox'] } - }, + { + name: 'firefox', + use: { ...devices['Desktop Firefox'] } + }, - { - name: 'webkit', - use: { ...devices['Desktop Safari'] } - } + { + name: 'webkit', + use: { ...devices['Desktop Safari'] } + } - /* Test against mobile viewports. */ - // { - // name: 'Mobile Chrome', - // use: { ...devices['Pixel 5'] }, - // }, - // { - // name: 'Mobile Safari', - // use: { ...devices['iPhone 12'] }, - // }, + /* Test against mobile viewports. */ + // { + // name: 'Mobile Chrome', + // use: { ...devices['Pixel 5'] }, + // }, + // { + // name: 'Mobile Safari', + // use: { ...devices['iPhone 12'] }, + // }, - /* Test against branded browsers. */ - // { - // name: 'Microsoft Edge', - // use: { ...devices['Desktop Edge'], channel: 'msedge' }, - // }, - // { - // name: 'Google Chrome', - // use: { ...devices['Desktop Chrome'], channel: 'chrome' }, - // }, - ], + /* Test against branded browsers. */ + // { + // name: 'Microsoft Edge', + // use: { ...devices['Desktop Edge'], channel: 'msedge' }, + // }, + // { + // name: 'Google Chrome', + // use: { ...devices['Desktop Chrome'], channel: 'chrome' }, + // }, + ], - /* Run your local dev server before starting the tests */ - webServer: { - command: 'pnpm preview -- --host', - url: 'http://127.0.0.1:5173', - reuseExistingServer: !process.env.CI, - timeout: 180_000, // 3 minutes for slow CI environments like act - stdout: 'pipe', - stderr: 'pipe' - } + /* Run your local dev server before starting the tests */ + webServer: { + command: 'pnpm preview', + url: 'http://127.0.0.1:5173', + reuseExistingServer: !process.env.CI, + timeout: 10_000, + stdout: 'pipe', + stderr: 'pipe' + } }); From de859bec52643d593ef750cb97afb95ba0be0136 Mon Sep 17 00:00:00 2001 From: Robert Babaev Date: Tue, 21 Jul 2026 14:24:25 -0400 Subject: [PATCH 5/9] fix(prettier): no more single quotes Signed-off-by: Robert Babaev --- .prettierrc | 2 +- playwright.config.ts | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.prettierrc b/.prettierrc index 313a790..849718d 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,6 +1,6 @@ { "useTabs": false, - "singleQuote": true, + "singleQuote": false, "trailingComma": "none", "printWidth": 100, "plugins": [ diff --git a/playwright.config.ts b/playwright.config.ts index 91c00e9..dc82c29 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -1,4 +1,4 @@ -import { defineConfig, devices } from '@playwright/test'; +import { defineConfig, devices } from "@playwright/test"; /** * Read environment variables from file. @@ -13,7 +13,7 @@ import { defineConfig, devices } from '@playwright/test'; */ export default defineConfig({ timeout: 10_000, - testDir: 'e2e', + testDir: "e2e", /* Run tests in files in parallel */ fullyParallel: true, /* Fail the build on CI if you accidentally left test.only in the source code. */ @@ -23,31 +23,31 @@ export default defineConfig({ /* Opt out of parallel tests on CI. */ workers: process.env.CI ? 1 : undefined, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - reporter: 'html', + reporter: "html", /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Base URL to use in actions like `await page.goto('/')`. */ - baseURL: 'http://localhost:5173', + baseURL: "http://localhost:5173", /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ - trace: 'on-first-retry' + trace: "on-first-retry" }, /* Configure projects for major browsers */ projects: [ { - name: 'chromium', - use: { ...devices['Desktop Chrome'] } + name: "chromium", + use: { ...devices["Desktop Chrome"] } }, { - name: 'firefox', - use: { ...devices['Desktop Firefox'] } + name: "firefox", + use: { ...devices["Desktop Firefox"] } }, { - name: 'webkit', - use: { ...devices['Desktop Safari'] } + name: "webkit", + use: { ...devices["Desktop Safari"] } } /* Test against mobile viewports. */ @@ -73,11 +73,11 @@ export default defineConfig({ /* Run your local dev server before starting the tests */ webServer: { - command: 'pnpm preview', - url: 'http://127.0.0.1:5173', + command: "pnpm preview", + url: "http://127.0.0.1:5173", reuseExistingServer: !process.env.CI, timeout: 10_000, - stdout: 'pipe', - stderr: 'pipe' + stdout: "pipe", + stderr: "pipe" } }); From 14b577ba01dcb7e7585ac34de13ffde6db6cd424 Mon Sep 17 00:00:00 2001 From: Robert Babaev Date: Tue, 21 Jul 2026 14:27:23 -0400 Subject: [PATCH 6/9] fix(ci): secrets don't go into actions whoops Signed-off-by: Robert Babaev --- .github/actions/devenv-setup/action.yml | 7 ++++++- .github/workflows/deploy.yml | 18 ++++++++++-------- .github/workflows/playwright.yml | 10 ++++++---- .github/workflows/test.yml | 6 ++++-- 4 files changed, 26 insertions(+), 15 deletions(-) diff --git a/.github/actions/devenv-setup/action.yml b/.github/actions/devenv-setup/action.yml index 90e245a..6b36bc3 100644 --- a/.github/actions/devenv-setup/action.yml +++ b/.github/actions/devenv-setup/action.yml @@ -1,11 +1,16 @@ name: Setup devenv description: Install Nix, Cachix, and devenv +inputs: + GITHUB_TOKEN: + description: "GitHub's GITHUB_TOKEN secret." + required: true + runs: using: composite steps: - uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6 with: - github_access_token: ${{ secrets.GITHUB_TOKEN }} + github_access_token: ${{ inputs.GITHUB_TOKEN }} extra_nix_config: | keep-env-derivations = true keep-outputs = true diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cddb73d..d4e5e91 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,15 +3,15 @@ name: Deploy to DigitalOcean on: push: branches: - - 'main' + - "main" paths: - - 'resume/**' - - 'config/resume_data.toml' - - 'config/resume_variants/**' - - 'scripts/generate_resume_data.ts' - - 'src/lib/resume/**' - - 'terraform/**' - - '.github/workflows/deploy.yml' + - "resume/**" + - "config/resume_data.toml" + - "config/resume_variants/**" + - "scripts/generate_resume_data.ts" + - "src/lib/resume/**" + - "terraform/**" + - ".github/workflows/deploy.yml" workflow_dispatch: jobs: @@ -31,6 +31,8 @@ jobs: PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} - uses: ./.github/actions/devenv-setup + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Install dependencies run: pnpm install --frozen-lockfile diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index ef812e0..1e1931d 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -23,6 +23,8 @@ jobs: export-environment-variables: CACHIX_AUTH_TOKEN - uses: ./.github/actions/devenv-setup + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Setup cache uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 @@ -37,10 +39,10 @@ jobs: - name: Build env: - PUBLIC_URL_ORIGIN: 'http://127.0.0.1:4173' - PUBLIC_DEV_RESUME: 'http://127.0.0.1:4173/dev/resume.pdf' - PUBLIC_DEVOPS_RESUME: 'http://127.0.0.1:4173/devops/resume.pdf' - PUBLIC_SECURITY_RESUME: 'http://127.0.0.1:4173/security/resume.pdf' + PUBLIC_URL_ORIGIN: "http://127.0.0.1:4173" + PUBLIC_DEV_RESUME: "http://127.0.0.1:4173/dev/resume.pdf" + PUBLIC_DEVOPS_RESUME: "http://127.0.0.1:4173/devops/resume.pdf" + PUBLIC_SECURITY_RESUME: "http://127.0.0.1:4173/security/resume.pdf" run: pnpm build - name: Install Playwright Browsers diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 35be57a..a290e9a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,10 +3,10 @@ name: Run Tests on: push: branches: - - 'main' + - "main" pull_request: branches: - - 'main' + - "main" jobs: test-vitest: @@ -27,6 +27,8 @@ jobs: export-environment-variables: CACHIX_AUTH_TOKEN - uses: ./.github/actions/devenv-setup + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Install Node.js dependencies run: pnpm install --frozen-lockfile From b60a0311c46cf45b61462b97b96f6d76bf36e40c Mon Sep 17 00:00:00 2001 From: Robert Babaev Date: Tue, 21 Jul 2026 14:29:09 -0400 Subject: [PATCH 7/9] fix(ci): what do you mean you couldn't find the action WHAT Signed-off-by: Robert Babaev --- .github/actions/devenv-setup/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/devenv-setup/action.yml b/.github/actions/devenv-setup/action.yml index 6b36bc3..d7ad51b 100644 --- a/.github/actions/devenv-setup/action.yml +++ b/.github/actions/devenv-setup/action.yml @@ -36,7 +36,7 @@ runs: purge-last-accessed: P1DT12H # except any version with the key that is the same as the `primary-key` purge-primary-key: never - - uses: cachix/cachix-action@6f2d7c5294214f71b873db4b969586b980625e71 # v17 + - uses: cachix/cachix-action@5f2d7c5294214f71b873db4b969586b980625e71 # v17 with: name: devenv - name: Configure rbabaev Cachix cache From d6ad7bb0b5ab999df700ce33d299cf4179d95f7b Mon Sep 17 00:00:00 2001 From: Robert Babaev Date: Tue, 21 Jul 2026 14:38:59 -0400 Subject: [PATCH 8/9] fix(ci): giving up on playwright for now Signed-off-by: Robert Babaev --- .github/workflows/playwright.yml | 68 ------------------------- devenv.nix | 2 - e2e/home.spec.ts | 86 -------------------------------- package.json | 4 +- playwright.config.ts | 83 ------------------------------ 5 files changed, 1 insertion(+), 242 deletions(-) delete mode 100644 .github/workflows/playwright.yml delete mode 100644 e2e/home.spec.ts delete mode 100644 playwright.config.ts diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml deleted file mode 100644 index 1e1931d..0000000 --- a/.github/workflows/playwright.yml +++ /dev/null @@ -1,68 +0,0 @@ -name: Playwright Tests -on: - push: - branches: [main, master] - pull_request: - branches: [main, master] - -jobs: - test-e2e: - timeout-minutes: 60 - runs-on: ubuntu-24.04 - defaults: - run: - shell: devenv-ci {0} - steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - - - name: Load secrets from Pulumi ESC - uses: ./.github/actions/pulumi-esc - env: - PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} - with: - export-environment-variables: CACHIX_AUTH_TOKEN - - - uses: ./.github/actions/devenv-setup - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Setup cache - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 - id: playwright-cache - with: - path: | - ~/.cache/ms-playwright - key: ${{ runner.os }}-playwright - - - name: Install deps - run: pnpm install --frozen-lockfile - - - name: Build - env: - PUBLIC_URL_ORIGIN: "http://127.0.0.1:4173" - PUBLIC_DEV_RESUME: "http://127.0.0.1:4173/dev/resume.pdf" - PUBLIC_DEVOPS_RESUME: "http://127.0.0.1:4173/devops/resume.pdf" - PUBLIC_SECURITY_RESUME: "http://127.0.0.1:4173/security/resume.pdf" - run: pnpm build - - - name: Install Playwright Browsers - if: steps.playwright-cache.outputs.cache-hit != 'true' - run: | - set -x - pnpm exec playwright install --with-deps - - - name: Install Playwright Browsers - Cache Hit - if: steps.playwright-cache.outputs.cache-hit == 'true' - run: | - set -x - pnpm exec playwright install-deps - - - name: Run Playwright tests - run: pnpm exec playwright test - - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - if: ${{ !cancelled() && !github.event.act }} - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 diff --git a/devenv.nix b/devenv.nix index 860945a..0d76ad5 100644 --- a/devenv.nix +++ b/devenv.nix @@ -40,8 +40,6 @@ in { entr git gnumake - playwright - playwright-test pulumi-bin tree # keep-sorted end diff --git a/e2e/home.spec.ts b/e2e/home.spec.ts deleted file mode 100644 index a5a5eca..0000000 --- a/e2e/home.spec.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { type Page, test as baseTest, expect } from '@playwright/test'; - -import { compileConfig } from '../src/lib/server/config'; -import { type HomepageConfig } from '../src/lib/types/index'; - -const test = baseTest.extend<{ - config: HomepageConfig; -}>({ - config: async ({}, use) => { - const config = await compileConfig('config/homepage.toml'); - await use(config); - } -}); - -test.describe('Home page', () => { - test('has the right title', async ({ page }) => { - await page.goto('/'); - - await expect(page).toHaveTitle('Home - Robert Babaev'); - }); - - test.fixme('hero section displays correct fields', async ({ page, config }) => { - test.slow(); - await page.goto('/'); - - // Check if the Designation field exists and has correct content - const designationHeading = page.getByRole('heading', { name: 'Designation' }); - await expect(designationHeading).toBeVisible(); - - // const designations = ['Security SWE', 'Full Stack SWE', 'Platform Engineer', 'DevOps Engineer']; - // await Promise.all( - // designations.map(async (designation) => { - // await page.getByText(designation).waitFor({ state: 'visible', timeout: 20000 }); - // }) - // ); - - await page.evaluate(() => { - return new Promise((resolve) => setTimeout(resolve, 2000)); - }); - - // Check Current Affiliation field - await expect(page.getByRole('heading', { name: 'Current Affiliation' })).toBeVisible(); - await page - .getByText(config.fields['current_affiliation'].content as string) - .waitFor({ state: 'visible', timeout: 1000 }); - - // Check Pronouns field - await expect(page.getByRole('heading', { name: 'Pronouns' })).toBeVisible(); - await page - .getByText(config.fields['pronouns'].content as string) - .waitFor({ state: 'visible', timeout: 1000 }); - }); - - test.describe('navigation cards', () => { - const options = ['resume', 'about', 'contact']; - options.forEach((option) => { - test(option, async ({ page, browserName }) => { - test.fixme(browserName === 'webkit', 'Webkit breaks on for some reason.'); - await page.goto('/'); - const optionCard = page.getByTestId(`home-option-${option}`); - await expect(optionCard).toBeVisible(); - await optionCard.click(); - await page.waitForURL(`/${option}`); - }); - }); - }); - - test('featured projects are displayed correctly', async ({ page }) => { - await page.goto('/'); - - // Check if the featured projects section exists - await expect(page.getByRole('heading', { name: 'Featured Projects' })).toBeVisible(); - - // TODO: Map these to the config items - - // Check for speedbeaver project - await expect(page.getByRole('heading', { name: 'speedbeaver' })).toBeVisible(); - await expect( - page.getByText('A set-it-and-forget-it logging integration for FastAPI.') - ).toBeVisible(); - - // Check for CourseFull project - await expect(page.getByRole('heading', { name: 'CourseFull' })).toBeVisible(); - await expect(page.getByText('A better way for students to track their goals.')).toBeVisible(); - }); -}); diff --git a/package.json b/package.json index a0d4f75..7d2e9cb 100644 --- a/package.json +++ b/package.json @@ -13,15 +13,13 @@ "format": "prettier --write .", "lint": "prettier --check . && eslint .", "generate-resume-data": "tsx scripts/generate_resume_data.ts && taplo fmt resume/*/data.toml", - "test": "vitest run", - "e2e": "playwright test --trace on" + "test": "vitest run" }, "devDependencies": { "@eslint/compat": "^1.4.1", "@eslint/js": "^9.39.4", "@iarna/toml": "^2.2.5", "@lucide/svelte": "^0.482.0", - "@playwright/test": "^1.61.1", "@sveltejs/adapter-static": "^3.0.10", "@sveltejs/kit": "^2.69.2", "@sveltejs/vite-plugin-svelte": "^5.1.1", diff --git a/playwright.config.ts b/playwright.config.ts deleted file mode 100644 index dc82c29..0000000 --- a/playwright.config.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { defineConfig, devices } from "@playwright/test"; - -/** - * Read environment variables from file. - * https://github.com/motdotla/dotenv - */ -// import dotenv from 'dotenv'; -// import path from 'path'; -// dotenv.config({ path: path.resolve(__dirname, '.env') }); - -/** - * See https://playwright.dev/docs/test-configuration. - */ -export default defineConfig({ - timeout: 10_000, - testDir: "e2e", - /* Run tests in files in parallel */ - fullyParallel: true, - /* Fail the build on CI if you accidentally left test.only in the source code. */ - forbidOnly: !!process.env.CI, - /* Retry on CI only */ - retries: process.env.CI ? 2 : 0, - /* Opt out of parallel tests on CI. */ - workers: process.env.CI ? 1 : undefined, - /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - reporter: "html", - /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ - use: { - /* Base URL to use in actions like `await page.goto('/')`. */ - baseURL: "http://localhost:5173", - - /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ - trace: "on-first-retry" - }, - - /* Configure projects for major browsers */ - projects: [ - { - name: "chromium", - use: { ...devices["Desktop Chrome"] } - }, - - { - name: "firefox", - use: { ...devices["Desktop Firefox"] } - }, - - { - name: "webkit", - use: { ...devices["Desktop Safari"] } - } - - /* Test against mobile viewports. */ - // { - // name: 'Mobile Chrome', - // use: { ...devices['Pixel 5'] }, - // }, - // { - // name: 'Mobile Safari', - // use: { ...devices['iPhone 12'] }, - // }, - - /* Test against branded browsers. */ - // { - // name: 'Microsoft Edge', - // use: { ...devices['Desktop Edge'], channel: 'msedge' }, - // }, - // { - // name: 'Google Chrome', - // use: { ...devices['Desktop Chrome'], channel: 'chrome' }, - // }, - ], - - /* Run your local dev server before starting the tests */ - webServer: { - command: "pnpm preview", - url: "http://127.0.0.1:5173", - reuseExistingServer: !process.env.CI, - timeout: 10_000, - stdout: "pipe", - stderr: "pipe" - } -}); From 26acfb5844a9d00470f96845a7198969ce622a2b Mon Sep 17 00:00:00 2001 From: Robert Babaev Date: Tue, 21 Jul 2026 14:45:08 -0400 Subject: [PATCH 9/9] fix(ci): pnpm lock Signed-off-by: Robert Babaev --- pnpm-lock.yaml | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f460912..ff7ccd3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,9 +30,6 @@ importers: '@lucide/svelte': specifier: ^0.482.0 version: 0.482.0(svelte@5.56.4(@typescript-eslint/types@8.63.0)) - '@playwright/test': - specifier: ^1.61.1 - version: 1.61.1 '@sveltejs/adapter-static': specifier: ^3.0.10 version: 3.0.10(@sveltejs/kit@2.69.2(@sveltejs/vite-plugin-svelte@5.1.1(svelte@5.56.4(@typescript-eslint/types@8.63.0))(vite@6.4.3(@types/node@22.20.0)(jiti@1.21.7)(tsx@4.23.0)(yaml@2.9.0)))(svelte@5.56.4(@typescript-eslint/types@8.63.0))(typescript@5.9.3)(vite@6.4.3(@types/node@22.20.0)(jiti@1.21.7)(tsx@4.23.0)(yaml@2.9.0))) @@ -653,11 +650,6 @@ packages: resolution: {integrity: sha512-SEeaJLb3qBNF/OaXnaR1NmmBbFYk1zC0ZH/52fATcRPLFg/p791YrcyFFy44Bo9sLaGuSuLp5Q6axbb/O+v/RA==} engines: {node: ^14.18.0 || >=16.0.0} - '@playwright/test@1.61.1': - resolution: {integrity: sha512-8nKv6+0RJSL9FE4jYOEGXnPeM/Hg12qZpmqzZjRh3qM0Y7c3z1mrOTfFLids72RDQYVh9WpLEfR5WdpNX4fkig==} - engines: {node: '>=18'} - hasBin: true - '@polka/url@1.0.0-next.29': resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==} @@ -1453,11 +1445,6 @@ packages: fraction.js@5.3.4: resolution: {integrity: sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==} - fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -1814,16 +1801,6 @@ packages: pkg-types@2.3.1: resolution: {integrity: sha512-y+ichcgc2LrADuhLNAx8DFjVfgz91pRxfZdI3UDhxHvcVEZsenLO+7XaU5vOp0u/7V/wZ+plyuQxtrDlZJ+yeg==} - playwright-core@1.61.1: - resolution: {integrity: sha512-h7Qlt6m4REp25qvIdvbDtVmD4LqVXfpRxhORv9L0jzETM05p4fuPJ3dKyuSXQxDSbXnmS79HAgi9589lGSpLkg==} - engines: {node: '>=18'} - hasBin: true - - playwright@1.61.1: - resolution: {integrity: sha512-DWnY5o3YbLWK4GovuAVwpqL+1VwGNdUGrRr++8j8PtQQzvAVZUIMjKQ90fY689sEJZJBbZVw1rXaOKSTitkzPQ==} - engines: {node: '>=18'} - hasBin: true - postcss-import@15.1.0: resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} engines: {node: '>=14.0.0'} @@ -2804,10 +2781,6 @@ snapshots: '@pkgr/core@0.3.6': {} - '@playwright/test@1.61.1': - dependencies: - playwright: 1.61.1 - '@polka/url@1.0.0-next.29': {} '@rollup/rollup-android-arm-eabi@4.62.2': @@ -3638,9 +3611,6 @@ snapshots: fraction.js@5.3.4: {} - fsevents@2.3.2: - optional: true - fsevents@2.3.3: optional: true @@ -3965,14 +3935,6 @@ snapshots: exsolve: 1.1.0 pathe: 2.0.3 - playwright-core@1.61.1: {} - - playwright@1.61.1: - dependencies: - playwright-core: 1.61.1 - optionalDependencies: - fsevents: 2.3.2 - postcss-import@15.1.0(postcss@8.5.16): dependencies: postcss: 8.5.16