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

Refresh deps #632

Merged
merged 24 commits into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ VITE_BASE_PATH=/
VITE_STATIC_PATH=
VITE_DEBUG_HMR=true
VITE_DEBUG_RENDER_TRACKER=false
VITE_DEBUG_DISABLE_REACTSTRICTMODE=
VITE_HTTPS=false
VITE_DEBUG_DISABLE_REACTSTRICTMODE=
Akiyamka marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 1 addition & 2 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ VITE_ANALYZE_BUNDLE=false
VITE_BASE_PATH=/active/
VITE_STATIC_PATH=static/
VITE_DEBUG_HMR=false
VITE_DEBUG_RENDER_TRACKER=false
VITE_HTTPS=false
VITE_DEBUG_RENDER_TRACKER=false
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
],
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/ban-ts-comment": "warn",
"react/react-in-jsx-scope": "off",
"@typescript-eslint/no-unused-vars": "off",
Expand Down
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
interval: "monthly"
versioning-strategy: increase
56 changes: 39 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: build
on:
push:
branches:
- 'main'
- 'release-*'
- "main"
- "release-*"
pull_request:
types:
- opened
Expand All @@ -14,7 +14,7 @@ on:

env:
NODE_ENV: production
AVA_FORCE_CI: 'not-ci'
AVA_FORCE_CI: "not-ci"
REGISTRY: ghcr.io
IMAGE_REPO: ${{ github.repository }}

Expand All @@ -27,14 +27,24 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
node-version: "20"

- run: corepack enable
- run: corepack prepare pnpm@8 --activate
- 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: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm run i18n:gettext-sync
${{ runner.os }}-pnpm-store-

- run: pnpm run i18n:gettext-sync
- shell: bash
run: |
status=$(git status --porcelain)
Expand All @@ -44,25 +54,37 @@ jobs:
else
echo "Translations are synced."
fi
- run: npm ci --include=dev
- run: npm run postinstall
- run: npm run lint
- run: npm run typecheck
- run: env NODE_ENV=test npm run coverage
- run: pnpm i
- run: pnpm run postinstall
- run: pnpm run lint
- run: pnpm run typecheck
- run: env NODE_ENV=test pnpm run coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3


build:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- run: npm ci --include=dev
- run: npm run build
node-version: "20"
- run: corepack enable
- run: corepack prepare pnpm@8 --activate
- 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-
- run: pnpm i
- run: pnpm run build
- name: Display structure of builded files
run: ls -R
working-directory: .
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy_cosmos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:

- name: Run cosmos:build to build static
run: |
npm ci --also=dev
npm run cosmos:build
pnpm ci --also=dev
pnpm run cosmos:build

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.3.3
Expand Down
171 changes: 105 additions & 66 deletions .github/workflows/size_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,84 +8,123 @@ jobs:
name: Build base
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.base_ref }}

- name: Install dependencies
run: npm ci
env:
NODE_AUTH_TOKEN: ${{secrets.TOKEN_REPO}}

- name: Build
run: npm run build

- name: Upload base size-report.json
uses: actions/upload-artifact@v3
with:
name: base
path: ./size-report.json
retention-days: 1
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.base_ref }}

- uses: actions/setup-node@v3
with:
node-version: "20"

- run: corepack enable
- run: corepack prepare pnpm@8 --activate

- 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 dependencies
run: pnpm i
env:
NODE_AUTH_TOKEN: ${{secrets.TOKEN_REPO}}

- name: Build
run: pnpm run build

- name: Upload base size-report.json
uses: actions/upload-artifact@v3
with:
name: base
path: ./size-report.json
retention-days: 1

build-pr:
name: Build PR
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: "20"

- run: corepack enable
- run: corepack prepare pnpm@8 --activate

- name: Install dependencies
run: npm ci
env:
NODE_AUTH_TOKEN: ${{secrets.TOKEN_REPO}}
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Build
run: npm run build
- 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: Upload base size-report.json
uses: actions/upload-artifact@v3
with:
name: pr
path: ./size-report.json
retention-days: 1
- name: Install dependencies
run: pnpm i
env:
NODE_AUTH_TOKEN: ${{secrets.TOKEN_REPO}}

- name: Build
run: pnpm run build

- name: Upload base size-report.json
uses: actions/upload-artifact@v3
with:
name: pr
path: ./size-report.json
retention-days: 1

report:
name: Generate report
runs-on: ubuntu-latest
needs: [build-base, build-pr]

steps:
- name: Checkout PR
uses: actions/checkout@v3

- name: Download base size-report.json
uses: actions/download-artifact@v3
with:
name: base
path: base

- name: Download PR size-report.json
uses: actions/download-artifact@v3
with:
name: pr
path: pr

- name: Get diff
id: get-diff
uses: Konturio/bundle-size-diff@v1.0.6
with:
base_path: './base/size-report.json'
pr_path: './pr/size-report.json'

- name: Comment
uses: NejcZdovc/comment-pr@v1
with:
file: 'comment.md'
identifier: "GITHUB_COMMENT_SIZE"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
OLD: ${{steps.get-diff.outputs.base_file_string}}
NEW: ${{steps.get-diff.outputs.pr_file_string}}
DIFF: ${{steps.get-diff.outputs.diff_file_string}}
DIFF_PERCENT: ${{steps.get-diff.outputs.percent}}
- name: Checkout PR
uses: actions/checkout@v3

- name: Download base size-report.json
uses: actions/download-artifact@v3
with:
name: base
path: base

- name: Download PR size-report.json
uses: actions/download-artifact@v3
with:
name: pr
path: pr

- name: Get diff
id: get-diff
uses: Konturio/bundle-size-diff@v1.0.6
with:
base_path: "./base/size-report.json"
pr_path: "./pr/size-report.json"

- name: Comment
uses: NejcZdovc/comment-pr@v1
with:
file: "comment.md"
identifier: "GITHUB_COMMENT_SIZE"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
OLD: ${{steps.get-diff.outputs.base_file_string}}
NEW: ${{steps.get-diff.outputs.pr_file_string}}
DIFF: ${{steps.get-diff.outputs.diff_file_string}}
DIFF_PERCENT: ${{steps.get-diff.outputs.percent}}
21 changes: 14 additions & 7 deletions .github/workflows/translations_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,26 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
node-version: "20"
- run: corepack enable
- run: corepack prepare pnpm@8 --activate
- 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: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci --include=dev
- run: npm run --silent i18n:report -- --out md > ./.github/workflows/translations-report.md
${{ runner.os }}-pnpm-store-
- run: pnpm i
- run: pnpm run --silent i18n:report -- --out md > ./.github/workflows/translations-report.md
- name: Comment
uses: NejcZdovc/comment-pr@v1
with:
file: "translations-report.md"
identifier: "GITHUB_COMMENT_TRANSLATION"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
3 changes: 2 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
strict-peer-dependencies=false
strict-peer-dependencies=false
enable-pre-post-scripts=true
10 changes: 8 additions & 2 deletions devbox.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
{
"packages": [
"nodejs@20",
"nodePackages.pnpm@6",
"go@latest",
"gopls@latest"
],
"shell": {
"init_hook": [
"npm i"
"pnpm i"
],
"scripts": {
"dev": "npm run dev",
"release": "npm run release",
"test": [
"npm run test:unit",
"npm run:typecheck"
"npm run typecheck"
],
"lint": [
"npm run lint:js",
"npm run lint:css",
"npm run depcruise"
]
}
}
Expand Down
Loading
Loading