Skip to content

chore: run just fmt to reorg use statements (#306) #28

chore: run just fmt to reorg use statements (#306)

chore: run just fmt to reorg use statements (#306) #28

Workflow file for this run

name: CI-Linux
on: [push, pull_request, merge_group]
env:
CARGO_TERM_COLOR: always
jobs:
lint:
name: docs - stable - x86_64-unknown-linux-gnu
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with: { persist-credentials: false }
- name: Install dependencies
shell: bash
run: |
rustc --version
cargo --version
sudo apt-get update
sudo apt-get install -y libgdal-dev libgeos-dev
- 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: Test Doc Build
shell: bash
# Make sure this list matches the members list in Cargo.toml
run: |
for package in geozero 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"
test:
name: tests - stable - x86_64-unknown-linux-gnu
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- 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@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
- name: Tests
shell: bash
run: |
cargo test -p geozero
cargo test -p geozero --no-default-features
cargo test --workspace --all-features
- name: Set up PostgreSQL with PostGIS
uses: nyurik/action-setup-postgis@228cfe4dd41aad01801a0bdc767040e5024fff1d # v2
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"
# This final step is needed to mark the whole workflow as successful
# Don't change its name - it is used by the merge protection rules
done:
name: stable - x86_64-unknown-linux-gnu
runs-on: ubuntu-latest
needs: [ lint, test ]
if: always()
permissions: {}
steps:
- name: Result of the needed steps
run: echo "${{ toJSON(needs) }}"
- if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }}
name: CI Result
run: exit 1