-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
103 additions
and
13 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Check | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Deno | ||
uses: denoland/setup-deno@v1 | ||
|
||
- name: Check format | ||
run: deno fmt | ||
|
||
- name: Check lint | ||
run: deno lint |
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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Test | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
|
||
matrix: | ||
package: | ||
- cli | ||
- core | ||
- integration | ||
- lib | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodule: matrix.package == 'core' | ||
|
||
- name: Setup Deno | ||
uses: denoland/setup-deno@v1 | ||
|
||
- name: Setup Deno cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/deno | ||
key: deno-${{ hashFiles('./deno.lock') }} | ||
restore-keys: deno | ||
|
||
- name: Setup Rust cache | ||
if: matrix.package == 'core' | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: cargo-${{ hashFiles('./**/Cargo.lock') }} | ||
restore-keys: cargo | ||
|
||
- name: Build Rust crates | ||
if: matrix.package == 'core' | ||
run: deno task build | ||
|
||
- name: Run tests | ||
run: deno test -A --unstable-kv --coverage=./coverage_profile ${{ matrix.package }} | ||
|
||
- name: Create coverage report | ||
run: deno coverage ./coverage_profile --lcov --output=./coverage.lcov | ||
|
||
- name: Upload to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
directory: ./ | ||
file: ./coverage.lcov | ||
token: ${{ secrets.CODECOV_TOKEN }} |
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