diff --git a/.github/actions/install-cache-deps/action.yml b/.github/actions/install-cache-deps/action.yml index 429e8dfef..493ae3f9d 100644 --- a/.github/actions/install-cache-deps/action.yml +++ b/.github/actions/install-cache-deps/action.yml @@ -5,32 +5,61 @@ author: dgrebb inputs: WORKSPACE_ROOT: description: Working Directory + BROWSER_BINARIES: + description: If the workflow needs BackstopJS testing, install and cache browser binaries. + default: "false" runs: using: composite steps: - - name: ⚄ Setup pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 + # - name: ⚄ Setup pnpm + # uses: pnpm/action-setup@v2 + # with: + # version: 8 + + # - name: ⬢ Setup Node & pnpm Cache + # uses: actions/setup-node@v4 + # with: + # node-version: ${{ env.NODE_VERSION }} + # cache: pnpm + # cache-dependency-path: | + # ${{ inputs.WORKSPACE_ROOT }}/package.json + # ${{ inputs.WORKSPACE_ROOT }}/pnpm-lock.yaml + # ${{ inputs.WORKSPACE_ROOT }}/node_modules - - name: ⬢ Setup Node & pnpm Cache + - name: Install Node.js uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} - cache: pnpm - cache-dependency-path: | - ${{ inputs.WORKSPACE_ROOT }}/package.json - ${{ inputs.WORKSPACE_ROOT }}/pnpm-lock.yaml - ${{ inputs.WORKSPACE_ROOT }}/node_modules + + - uses: pnpm/action-setup@v2 + name: Install pnpm + with: + version: 8 + run_install: false + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: 🎭 Install & Cache Playwright Binaries + if: ${{ inputs.BROWSER_BINARIES }} shell: bash working-directory: ${{ inputs.WORKSPACE_ROOT }} id: playwright-version run: echo 'PLAYWRIGHT_VERSION=$(cat package.json | jq -r '.dependencies.playwright' || 'latest')' >> $GITHUB_ENV - uses: actions/cache@v3 + if: ${{ inputs.BROWSER_BINARIES }} id: playwright-cache with: path: | @@ -38,12 +67,12 @@ runs: key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }} - shell: bash - if: steps.playwright-cache.outputs.cache-hit != 'true' + if: ${{ inputs.BROWSER_BINARIES && steps.playwright-cache.outputs.cache-hit != 'true' }} working-directory: ${{ inputs.WORKSPACE_ROOT }} run: npx playwright install --with-deps - shell: bash - if: steps.playwright-cache.outputs.cache-hit != 'true' + if: ${{ inputs.BROWSER_BINARIES && steps.playwright-cache.outputs.cache-hit != 'true' }} working-directory: ${{ inputs.WORKSPACE_ROOT }} run: npx playwright install-deps diff --git a/.github/workflows/backstop-remote.yml b/.github/workflows/backstop-remote.yml index d849478a2..cf4f7c5c0 100644 --- a/.github/workflows/backstop-remote.yml +++ b/.github/workflows/backstop-remote.yml @@ -32,25 +32,13 @@ jobs: token: ${{ github.token }} fetch-depth: 1 sparse-checkout: | - _ci/backstop + .github/actions + _ci - - name: ⚄ Setup pnpm - uses: pnpm/action-setup@v2 + - name: 🛢 Install Dependencies + uses: ./.github/actions/install-cache-deps with: - version: 8 - - - name: ⬢ Setup Node & Cache - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - cache: "pnpm" - cache-dependency-path: | - _ci/backstop/package.json - _ci/backstop/pnpm-lock.yaml - _ci/backstop/node_modules - - - name: ↧ Install Dependencies - run: cd _ci/backstop && pnpm install && npx playwright install --with-deps + WORKSPACE_ROOT: _ci - name: "Running Remote {ಠʖಠ}" id: backstop diff --git a/.github/workflows/bd-fe.yml b/.github/workflows/bd-fe.yml index ff584d624..139eeb760 100644 --- a/.github/workflows/bd-fe.yml +++ b/.github/workflows/bd-fe.yml @@ -92,6 +92,14 @@ jobs: ref: ${{ github.ref }} token: ${{ github.token }} fetch-depth: 1 + sparse-checkout: | + .github/actions + front + + - name: 🛢 Install Dependencies + uses: ./.github/actions/install-cache-deps + with: + WORKSPACE_ROOT: front - name: 🤿 Set Vars id: vars @@ -135,24 +143,6 @@ jobs: echo PUBLIC_ENV=${{ secrets.PUBLIC_ENV }} >> front/.env cat front/.env - - name: ⚄ Setup pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - - name: ⬢ Setup Node & Cache - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - cache: "pnpm" - cache-dependency-path: | - front/package.json - front/pnpm-lock.yaml - front/node_modules - - - name: ↧ Install Dependencies - run: cd front && pnpm install - - name: ↻ Build run: | cd front diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 590ee960c..945edd58e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -31,26 +31,14 @@ jobs: token: ${{ github.token }} fetch-depth: 1 sparse-checkout: | + .github/actions front - - name: ⚄ Setup pnpm - uses: pnpm/action-setup@v2 + - name: 🛢 Install Dependencies + uses: ./.github/actions/install-cache-deps with: - version: 8 - - - name: ⬢ Setup Node & Cache - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - cache: "pnpm" - cache-dependency-path: | - front/package.json - front/pnpm-lock.yaml - front/node_modules - - - name: ↧ Install Dependencies - run: cd front && pnpm install + WORKSPACE_ROOT: front - name: 👓 Check run: | - cd front && npm run lint + cd front && pnpm check && pnpm lint diff --git a/.github/workflows/test-backstop.yml b/.github/workflows/test-backstop.yml index 266de19dd..59d2d55d9 100644 --- a/.github/workflows/test-backstop.yml +++ b/.github/workflows/test-backstop.yml @@ -63,6 +63,7 @@ jobs: uses: ./.github/actions/install-cache-deps with: WORKSPACE_ROOT: _ci/backstop + BROWSER_BINARIES: true - name: 🔥 Warmup Cache run: ./_ci/_utils/warmup.sh ${{ inputs.env }} diff --git a/.github/workflows/test-lighthouse.yml b/.github/workflows/test-lighthouse.yml index 4e55443ca..c175ae778 100644 --- a/.github/workflows/test-lighthouse.yml +++ b/.github/workflows/test-lighthouse.yml @@ -43,31 +43,13 @@ jobs: token: ${{ github.token }} fetch-depth: 1 sparse-checkout: | - _ci/_utils - _ci/perf + .github/actions + _ci - - name: ⚄ Setup pnpm - uses: pnpm/action-setup@v2 + - name: 🛢 Install Dependencies + uses: ./.github/actions/install-cache-deps with: - version: 8 - - - name: ⬢ Setup Node & Cache - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - cache: "pnpm" - cache-dependency-path: | - _ci/perf/package.json - _ci/perf/pnpm-lock.yaml - _ci/perf/node_modules - - - name: ↧ Install & Patch - run: | - cd _ci/perf && pnpm i - - - name: 🌤️ Warmup CloudFront Cache - run: | - _ci/_utils/warmup.sh ${{ inputs.env }} + WORKSPACE_ROOT: _ci/perf - name: 🔦 Lighthouse id: lighthouse diff --git a/.github/workflows/test-psi.yml b/.github/workflows/test-psi.yml index 90f1c0bbb..2643097ad 100644 --- a/.github/workflows/test-psi.yml +++ b/.github/workflows/test-psi.yml @@ -40,27 +40,13 @@ jobs: token: ${{ github.token }} fetch-depth: 1 sparse-checkout: | - _ci/_utils - _ci/perf + .github/actions + _ci - - name: ⚄ Setup pnpm - uses: pnpm/action-setup@v2 + - name: 🛢 Install Dependencies + uses: ./.github/actions/install-cache-deps with: - version: 8 - - - name: ⬢ Setup Node & Cache - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - cache: "pnpm" - cache-dependency-path: | - _ci/perf/package.json - _ci/perf/pnpm-lock.yaml - _ci/perf/node_modules - - - name: ↧ Install & Patch - run: | - cd _ci/perf && pnpm i + WORKSPACE_ROOT: _ci - name: 🌤️ Warmup CloudFront Cache run: | diff --git a/front/package.json b/front/package.json index 5dd8c0f86..16a6f9d54 100644 --- a/front/package.json +++ b/front/package.json @@ -3,8 +3,8 @@ "version": "3.16.1", "private": true, "scripts": { - "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch", + "check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --compiler-warnings \"css-unused-selector:ignore\"", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch --compiler-warnings \"css-unused-selector:ignore\"", "prettier": "prettier", "baseline": "mv -f ./.report/bundle/current/* ./.report/bundle/previous", "bundle-stats": "bundle-stats", diff --git a/front/src/lib/components/cv/SkillBreakdown.svelte b/front/src/lib/components/cv/SkillBreakdown.svelte index e582f1276..844a6d933 100644 --- a/front/src/lib/components/cv/SkillBreakdown.svelte +++ b/front/src/lib/components/cv/SkillBreakdown.svelte @@ -145,7 +145,7 @@ align-items: center; } &__term { - & .skill-icon__svg & { + & .skill-icon__svg { padding: 2.5rem 0 0.25rem 0; } }