More connection stability improvements #1963
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v1 | |
- run: deno lint | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v1 | |
- run: deno fmt --check | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v1 | |
with: | |
deno-version: canary | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/deno/deps | |
key: ${{ runner.os }}-${{ hashFiles('0_deps.ts') }} | |
- run: deno check mod.ts | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- run: pnpm dlx dpdm --exit-code circular:1 mod.ts | |
- run: deno run --allow-read https://raw.githubusercontent.com/MTKruto/tools/main/check_import_levels.ts | |
- run: deno vendor mod.ts | |
- run: deno run -A https://esm.sh/gh/mtkruto/tools@4ca0c02076/pre_jsr.ts 0.0.0 | |
- run: deno publish --allow-dirty --dry-run | |
test: | |
strategy: | |
matrix: | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
include: | |
- platform: ubuntu-latest | |
cache_path: ~/.cache/deno/deps | |
- platform: macos-latest | |
cache_path: ~/Library/Caches/deno/deps | |
- platform: windows-latest | |
cache_path: ~\AppData\Local\deno\deps | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v1 | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ matrix.cache_path }} | |
key: ${{ runner.os }}-${{ hashFiles('0_deps.ts') }} | |
- run: deno test --allow-env | |
env: | |
__TYPE_MAP: 1 | |
transform-browser: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/github-script@v6 | |
if: github.ref == 'refs/heads/main' | |
with: | |
github-token: ${{ secrets.PAT_TOKEN }} | |
script: | | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: "MTKruto", | |
repo: "browser-canary", | |
workflow_id: "update.yml", | |
ref: "main", | |
}); | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v1 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/deno/deps | |
key: ${{ hashFiles('0_deps.ts') }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('0_deps.ts') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Transform | |
run: deno run -A https://raw.githubusercontent.com/MTKruto/npm/main/transform_browser.ts 0.0.0 ./mod.ts | |
env: | |
__TYPE_MAP: 1 | |
transform-node: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/github-script@v6 | |
if: github.ref == 'refs/heads/main' | |
with: | |
github-token: ${{ secrets.PAT_TOKEN }} | |
script: | | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: "MTKruto", | |
repo: "node-canary", | |
workflow_id: "update.yml", | |
ref: "main", | |
}); | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v1 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/deno/deps | |
key: ${{ hashFiles('0_deps.ts') }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('0_deps.ts') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Transform | |
run: deno run -A https://raw.githubusercontent.com/MTKruto/npm/main/transform_node.ts 0.0.0 ./mod.ts | |
env: | |
__TYPE_MAP: 1 | |
doc: | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.PAT_TOKEN }} | |
script: | | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: "MTKruto", | |
repo: "website", | |
workflow_id: "doc.yml", | |
ref: "main", | |
}); | |
l: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: test `cat $(find . -type f | grep ".ts$") | grep "console." | wc -l` -eq 12 |