-
Notifications
You must be signed in to change notification settings - Fork 38
71 lines (57 loc) · 1.89 KB
/
linux.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
58
59
60
61
62
63
64
65
66
67
68
69
70
name: CI-Linux
on: [push, pull_request, merge_group]
env:
CARGO_TERM_COLOR: always
jobs:
build_and_test:
name: stable - x86_64-unknown-linux-gnu
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
shell: bash
run: |
rustc --version
cargo --version
sudo apt-get update
sudo apt-get install -y libgdal-dev libgeos-dev
- name: Install protoc
uses: arduino/setup-protoc@v1
- name: Format Check
shell: bash
run: cargo fmt --all -- --check
- name: Clippy Check
shell: bash
run: cargo clippy --workspace --all-features --bins --examples --tests --benches -- -D warnings
- name: Tests
shell: bash
run: |
cargo test -p geozero
cargo test -p geozero --no-default-features
cargo test --workspace --all-features
- name: Test Doc Build
shell: bash
# Make sure this list matches the members list in Cargo.toml
run: |
for package in geozero geozero-shp geozero-cli geozero-bench; do
(echo "----- Testing doc build for package $package ----" && cargo doc -p $package --all-features --no-deps)
done
env:
RUSTDOCFLAGS: "-D warnings"
- name: Set up PostgreSQL with PostGIS
uses: nyurik/action-setup-postgis@v1
with:
username: ci
password: ci
database: test
rights: --superuser
port: 34837
id: pg
- name: PostGIS tests
shell: bash
run: |
psql -P pager=off -v ON_ERROR_STOP=1 -f geozero/tests/data/postgis.sql $DATABASE_URL
cargo test -p geozero --all-features -- --ignored postgis --test-threads 1
env:
DATABASE_URL: "${{ steps.pg.outputs.connection-uri }}?sslmode=disable"