-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (39 loc) · 1.01 KB
/
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
43
44
45
name: Basic Project Tests
on:
pull_request:
push:
branches:
- main
jobs:
tests:
name: Perform 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: |
~/.pgrx/
~/.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: |
if [[ ! -d ~/.pgrx ]]; then
cargo install --locked cargo-pgrx
cargo pgrx init
fi
- name: Lint
run: |
cargo fmt --all -- --check
cargo clippy -- -D warnings
- name: Execute tests
run: cargo pgrx test pg15