merge data providers and migrations #2533
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: coverage | |
on: | |
pull_request: | |
# Creates a coverage of the main branch | |
push: | |
branches: | |
- main | |
merge_group: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
coveralls: | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-22.04 | |
features: ["--all-features"] | |
build: [""] | |
services: | |
postgres: | |
image: postgis/postgis | |
env: | |
POSTGRES_USER: geoengine | |
POSTGRES_PASSWORD: geoengine | |
POSTGRES_DB: geoengine | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/free-disk-space@main | |
with: | |
# this might remove tools that are actually needed, | |
# if set to "true" but frees about 6 GB | |
tool-cache: true | |
# all of these default to true, but feel free to set to | |
# "false" if necessary for your workflow | |
android: true | |
dotnet: true | |
haskell: true | |
# we need clang + this takes some minutes | |
large-packages: false | |
# maybe we need swap storage | |
swap-storage: false | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: APT update | |
run: sudo apt-get update | |
- name: Install lld & GDAL & Protobuf | |
run: | | |
sudo apt-get install lld libgdal-dev gdal-bin build-essential curl protobuf-compiler | |
export C_INCLUDE_PATH=/usr/include/gdal:$C_INCLUDE_PATH | |
export CPLUS_INCLUDE_PATH=/usr/include/gdal:$CPLUS_INCLUDE_PATH | |
sudo ldconfig | |
- name: Install Rustup | |
run: | | |
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --profile minimal --default-toolchain none -y | |
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH | |
- name: Init rustup toolchain | |
# somehow rustup show will take care to initialize the version based on the toolchain file | |
run: rustup show | |
- name: Install `cargo-llvm-cov` | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: setup rust build cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
# An explicit cache key that is used instead of the automatic `job`-based | |
# cache key and is thus stable across jobs. | |
# Default: empty | |
shared-key: "" | |
# An additional cache key that is added alongside the automatic `job`-based | |
# cache key and can be used to further differentiate jobs. | |
# Default: empty | |
key: "ci_coverage_${{ matrix.os }}_${{ matrix.features }}_${{ matrix.build }}" | |
# A whitespace separated list of env-var *prefixes* who's value contributes | |
# to the environment cache key. | |
# The env-vars are matched by *prefix*, so the default `RUST` var will | |
# match all of `RUSTC`, `RUSTUP_*`, `RUSTFLAGS`, `RUSTDOC_*`, etc. | |
# Default: "CARGO CC CFLAGS CXX CMAKE RUST" | |
#env-vars: "" | |
# The cargo workspaces and target directory configuration. | |
# These entries are separated by newlines and have the form | |
# `$workspace -> $target`. The `$target` part is treated as a directory | |
# relative to the `$workspace` and defaults to "target" if not explicitly given. | |
# Default: ". -> target" | |
#workspaces: "" | |
# Determines if the cache should be saved even when the workflow has failed. | |
# Default: "false" | |
#cache-on-failure: "" | |
- name: Generate code coverage | |
run: | | |
cargo llvm-cov \ | |
--locked \ | |
${{ matrix.features }} \ | |
--lcov \ | |
--output-path lcov.info | |
- name: Upload coverage to Coveralls | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: lcov.info |