-
Notifications
You must be signed in to change notification settings - Fork 21
57 lines (56 loc) · 1.37 KB
/
ci.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: CI
on:
pull_request:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
name: CI
needs: [test, lint, lockfile]
runs-on: ubuntu-latest
steps:
- name: Done
run: exit 0
test:
name: Tests
strategy:
fail-fast: false
matrix:
postgres: [14, 15, 16, 17]
runner:
- ubuntu-22.04
- buildjet-8vcpu-ubuntu-2204-arm
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: docker buildx build --build-arg PG_MAJOR=${{ matrix.postgres }} -t test .
- name: Test
run: docker run test cargo pgrx test pg${{ matrix.postgres }}
lint:
name: Linting (fmt + clippy)
runs-on: ubuntu-latest
steps:
- name: Install rust
uses: dtolnay/rust-toolchain@1.81.0
with:
components: rustfmt, clippy
- name: Checkout
uses: actions/checkout@v3
- name: Format check
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
lockfile:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install rust
uses: dtolnay/rust-toolchain@1.81.0
- name: Lockfile check
run: cargo update -w --locked