-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (36 loc) · 967 Bytes
/
tests.yaml
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
34
35
36
37
38
39
40
41
42
name: Basic Project Tests
on:
pull_request:
push:
branches:
- main
jobs:
tests:
name: Perform unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Install pgrx
run: |
cargo install --locked cargo-pgrx
cargo pgrx init --pg15
- name: Lint
run: |
cargo fmt --all -- --check
cargo clippy -- -D warnings
- name: Execute tests
run: cargo pgrx test