Skip to content

Commit 111e7ec

Browse files
committed
Add GitHub workflow for running linters and tests
1 parent c4bd1df commit 111e7ec

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

.config/nextest.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[profile.ci]
2+
# Don't fail fast in CI to run the full test suite.
3+
fail-fast = false

.github/workflows/ci.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches:
7+
- main
8+
9+
name: CI
10+
11+
jobs:
12+
lint:
13+
name: Lint
14+
runs-on: ubuntu-latest
15+
env:
16+
RUSTFLAGS: -D warnings
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
# By default actions/checkout checks out a merge commit. Check out the PR head instead.
21+
# https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit
22+
ref: ${{ github.event.pull_request.head.sha }}
23+
- uses: actions-rust-lang/setup-rust-toolchain@v1
24+
with:
25+
toolchain: stable
26+
override: true
27+
components: rustfmt, clippy
28+
- name: Lint (clippy)
29+
uses: actions-rs/cargo@v1
30+
with:
31+
command: clippy
32+
args: --all-features --all-targets
33+
- name: Rustfmt Check
34+
uses: actions-rust-lang/rustfmt@v1
35+
36+
build:
37+
name: Build and test
38+
runs-on: ubuntu-latest
39+
env:
40+
RUSTFLAGS: -D warnings
41+
steps:
42+
- uses: actions/checkout@v4
43+
with:
44+
ref: ${{ github.event.pull_request.head.sha }}
45+
- uses: actions-rust-lang/setup-rust-toolchain@v1
46+
with:
47+
toolchain: 1.86
48+
override: true
49+
- name: Build extension
50+
uses: actions-rs/cargo@v1
51+
with:
52+
command: build
53+
args: --target wasm32-wasip1 --all-features
54+
- name: Install latest nextest release
55+
uses: taiki-e/install-action@nextest
56+
- name: Test with latest nextest release
57+
uses: actions-rs/cargo@v1
58+
with:
59+
command: nextest
60+
args: run --all-features --profile ci

0 commit comments

Comments
 (0)