-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from lambdalisue/fix
Minor fixes
- Loading branch information
Showing
17 changed files
with
265 additions
and
115 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,65 @@ | ||
name: Test | ||
|
||
env: | ||
DENO_VERSION: 1.x | ||
|
||
on: | ||
schedule: | ||
- cron: "0 7 * * 0" | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
paths: | ||
- "**.md" | ||
- "**.ts" | ||
- "deno.jsonc" | ||
- ".github/workflows/test.yml" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
runner: | ||
- ubuntu-latest | ||
version: | ||
- "1.x" | ||
- "1.28.x" | ||
runs-on: ${{ matrix.runner }} | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: git config --global core.autocrlf false | ||
if: runner.os == 'Windows' | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: "${{ matrix.version }}" | ||
- uses: actions/cache@v3 | ||
with: | ||
key: ${{ runner.os }}-deno-${{ hashFiles('**/*.ts') }} | ||
restore-keys: | | ||
${{ runner.os }}-deno- | ||
path: | | ||
/home/runner/.deno | ||
/home/runner/.cache/deno/deps/https/deno.land | ||
- name: Test | ||
deno-version: ${{ env.DENO_VERSION }} | ||
- name: Format | ||
run: | | ||
deno task test | ||
deno fmt --check | ||
- name: Lint | ||
run: deno lint | ||
- name: Type check | ||
run: deno task check | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: ${{ env.DENO_VERSION }} | ||
- name: Test | ||
run: | | ||
deno task check | ||
- name: Lint check | ||
run: | | ||
deno lint | ||
- name: Format check | ||
deno task test:coverage | ||
timeout-minutes: 5 | ||
- run: | | ||
deno task coverage --lcov > coverage.lcov | ||
- uses: codecov/codecov-action@v4 | ||
with: | ||
os: ${{ runner.os }} | ||
files: ./coverage.lcov | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
bench: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: ${{ env.DENO_VERSION }} | ||
- name: Install aha | ||
run: | | ||
deno fmt && git diff --exit-code | ||
- name: Bench | ||
sudo apt-get install aha | ||
- name: Benchmark | ||
run: | | ||
deno task bench | ||
deno task bench | aha --no-header >> $GITHUB_STEP_SUMMARY |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: update | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: 1.x | ||
- name: Configure Git | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email github-actions[bot]@users.noreply.github.com | ||
- name: Update dependencies and commit changes | ||
run: deno task -q upgrade:commit --summary ../title.txt --report ../body.md | ||
- name: Check result | ||
id: result | ||
uses: andstor/file-existence-action@v2 | ||
with: | ||
files: ../title.txt, ../body.md | ||
- name: Read title.txt | ||
id: title | ||
if: steps.result.outputs.files_exists == 'true' | ||
uses: juliangruber/read-file-action@v1 | ||
with: | ||
path: ../title.txt | ||
- name: Read body.md | ||
id: body | ||
if: steps.result.outputs.files_exists == 'true' | ||
uses: juliangruber/read-file-action@v1 | ||
with: | ||
path: ../body.md | ||
- name: Create a pull request | ||
if: steps.result.outputs.files_exists == 'true' | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com> | ||
branch: automation/update-dependencies | ||
title: ${{ steps.title.outputs.content }} | ||
body: ${{ steps.body.outputs.content }} | ||
labels: automation | ||
delete-branch: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
.tool-versions | ||
/.tools | ||
deno.lock | ||
.coverage |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
{ | ||
"tasks": { | ||
"test": "deno test -A --parallel", | ||
"check": "deno check **/*.ts", | ||
"test": "deno test -A --doc --parallel --shuffle", | ||
"test:coverage": "deno task test --coverage=.coverage", | ||
"coverage": "deno coverage .coverage", | ||
"bench": "deno bench -A", | ||
"check": "deno check $(find . -name '*.ts')", | ||
"upgrade": "deno run -A https://deno.land/x/udd/main.ts $(find . -name '*.ts')" | ||
"update": "deno run --allow-env --allow-read --allow-write=. --allow-run=git,deno --allow-net=jsr.io,registry.npmjs.org jsr:@molt/cli ./*.ts", | ||
"update:commit": "deno task -q update --commit --pre-commit=fmt,lint" | ||
}, | ||
"imports": { | ||
"https://deno.land/x/workerio@$MODULE_VERSION/": "./" | ||
} | ||
} |
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
Oops, something went wrong.