Skip to content

Commit

Permalink
chore: add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Cherry committed Nov 12, 2023
1 parent 42e619d commit 4d3f04f
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ charset = utf-8
indent_style = tab
trim_trailing_whitespace = true
insert_final_newline = false
end_of_line = lf
end_of_line = lf

[*.yml]
indent_style = space
37 changes: 37 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Test
on: [push, pull_request]

jobs:
test-node:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
node: [18, 20]
name: Node ${{ matrix.node }} Test
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Restore NPM cache
uses: actions/cache@v3
continue-on-error: true
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run lint


test-rs:
runs-on: ubuntu-latest
timeout-minutes: 15
name: Rust Test
steps:
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all --check

0 comments on commit 4d3f04f

Please sign in to comment.