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

feat: gracefully shutdown command when shutdown signal is received #493

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 13 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: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ end_of_line = lf
indent_style = space
indent_size = 2
max_line_length = 80

[*.rs]
indent_size = 4
6 changes: 2 additions & 4 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,14 @@ typescript:
- changed-files:
- any-glob-to-any-file:
[
'devtools/**',
'packages/**',
'package.json',
'pnpm-*.yaml',
'eslint.config.js',
'tsconfig.json',
]

documentation:
- changed-files:
- any-glob-to-any-file: ['apps/documentation/**']

'CI/CD':
- changed-files:
- any-glob-to-any-file: ['.github/**']
Expand All @@ -27,6 +24,7 @@ documentation:
- changed-files:
- any-glob-to-any-file:
[
'devtools/**',
'.npmrc',
'.nvmrc',
'.prettierrc',
Expand Down
77 changes: 0 additions & 77 deletions .github/workflows/documentation-ci.yml

This file was deleted.

55 changes: 0 additions & 55 deletions .github/workflows/documentation-deploy.yml

This file was deleted.

61 changes: 61 additions & 0 deletions .github/workflows/e2e-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: E2E CI

on:
push:
branches:
- 'main'
pull_request:

concurrency:
group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}'
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
e2e:
name: E2E Test (${{ matrix.os }})

strategy:
fail-fast: true
matrix:
os:
- 'ubuntu-latest'
- 'macos-latest'
- 'windows-latest'

runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install NodeJS Dependencies
uses: ./.github/actions/install-node-dependencies

- name: Setup rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Install Playwright Browsers
run: pnpm exec playwright install

- name: Run Playwright E2E tests
run: pnpm test:e2e

ci_ok:
name: E2E CI OK
runs-on: ubuntu-latest
timeout-minutes: 1
if: always()
needs: [e2e]
env:
FAILURE: ${{ contains(join(needs.*.result, ','), 'failure') }}
CANCELLED: ${{ contains(join(needs.*.result, ','), 'cancelled') }}
steps:
- name: Check for failure or cancelled jobs result
shell: bash
run: |
echo "Failure: $FAILURE - Cancelled: $CANCELLED"
if [ "$FAILURE" = "false" ] && [ "$CANCELLED" = "false" ]; then
exit 0
else
exit 1
fi
2 changes: 1 addition & 1 deletion .github/workflows/pr-title-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:
- name: Check type
id: type
# @warning Keep in sync with apps/documentation/src/routes/documentation/contributing/pull-requests.mdx
# @warning Keep in sync with https://github.com/tuono-labs/tuono-documentation/blob/main/src/routes/documentation/contributing/pull-requests.mdx
run: |
VALID_COMMIT_TYPES="chore|ci|docs|feat|fix|refactor|test"
REGEX="^(${VALID_COMMIT_TYPES})(\(.*\))?!?: .*"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/repo-root-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: ./.github/actions/install-node-dependencies

- name: Test project
run: pnpm repo:root:format:check
run: pnpm repo:root:format

ci_ok:
name: Repo root CI OK
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/typescript-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ jobs:
uses: ./.github/actions/install-node-dependencies

- name: Check formatting
run: pnpm format:check
run: pnpm run format

- name: Lint
run: pnpm lint
run: pnpm run lint

- name: Types
run: pnpm types
- name: Typecheck
run: pnpm run typecheck

ci_ok:
name: Typescript CI OK
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ vite.config.ts.timestamp*
*.pdb

# Files, generated by the code editors
.vscode/
.vscode/

2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ dist
vite.config.ts.timestamp-*

packages/tuono-lazy-fn-vite-plugin/tests/sources/*

e2e/fixtures/*/test-results
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ members = [
"crates/tuono_lib_macros"
]
exclude = [
"apps/documentation",
"examples/with-mdx",
"examples/tuono-app",
"examples/tuono-tutorial",
"examples/with-tailwind",
"e2e/fixtures/base",
]
1 change: 0 additions & 1 deletion apps/README.md

This file was deleted.

4 changes: 0 additions & 4 deletions apps/documentation/.env.local

This file was deleted.

4 changes: 0 additions & 4 deletions apps/documentation/.env.production

This file was deleted.

17 changes: 0 additions & 17 deletions apps/documentation/CONTRIBUTING.md

This file was deleted.

34 changes: 0 additions & 34 deletions apps/documentation/package.json

This file was deleted.

14 changes: 0 additions & 14 deletions apps/documentation/postcss.config.js

This file was deleted.

Binary file removed apps/documentation/public/Menlo-Regular.ttf
Binary file not shown.
Binary file removed apps/documentation/public/android-chrome-192x192.png
Binary file not shown.
Binary file removed apps/documentation/public/android-chrome-512x512.png
Binary file not shown.
Binary file removed apps/documentation/public/apple-touch-icon.png
Binary file not shown.
Binary file removed apps/documentation/public/favicon-16x16.png
Binary file not shown.
Binary file removed apps/documentation/public/favicon-32x32.png
Binary file not shown.
Binary file removed apps/documentation/public/favicon.ico
Binary file not shown.
Loading
Loading