-
-
Notifications
You must be signed in to change notification settings - Fork 26
33 lines (33 loc) · 914 Bytes
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Test
on:
push:
branches: [ "master" ]
pull_request_target:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
- name: Format check
run: cargo fmt --all -- --check
- name: Build
run: cargo build --verbose
- name: Run tests (native-tls)
run: cargo test --verbose
- name: Run tests (rustls)
run: cargo test --verbose --no-default-features --features=rustls