Skip to content
Draft

V1 #2

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 134 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
name: CI

on:
pull_request:
merge_group:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
lint-backend:
name: Lint Backend

runs-on: ubuntu-24.04
container: quay.io/geoengine/devcontainer:latest

permissions:
contents: read

defaults:
run:
working-directory: ./backend

steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Init rustup toolchain
run: rustup show
- 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_test_
- name: Rustfmt
run: ./lint.sh rustfmt
- name: Clippy
run: ./lint.sh clippy
- name: SQLFluff
run: ./lint.sh sqlfluff
- name: Start PostgreSQL
run: |
service postgresql start
psql postgres://geoengine:geoengine@localhost -c "CREATE DATABASE biois;"
- name: Diesel Check
run: ./lint.sh diesel_cli --with-install
env:
DATABASE_URL: postgres://geoengine:geoengine@localhost/biois

test-backend:
name: Test Backend

runs-on: ubuntu-24.04
container: quay.io/geoengine/devcontainer:latest

permissions:
contents: read

outputs:
coverage-artifact-id: ${{ steps.upload-artifact.outputs.artifact-id }}

defaults:
run:
working-directory: ./backend

steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Init rustup toolchain
run: rustup show

- name: Start PostgreSQL
run: |
service postgresql start
psql postgres://geoengine:geoengine@localhost -c "CREATE DATABASE biois;"
- 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_test_
- name: Test
run: |
cargo install --locked cargo-llvm-cov

cargo llvm-cov \
--locked \
--all-features \
--lcov \
--output-path /lcov.info
- id: upload-artifact
uses: actions/upload-artifact@v6
with:
name: lcov-report-backend-${{ github.run_id }}-${{ github.run_attempt }}
path: /lcov.info
compression-level: 9
retention-days: 1
if-no-files-found: error

upload-coverage:
name: Upload Coverage Report

runs-on: ubuntu-24.04

permissions:
contents: read

needs:
- test-backend

steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Download Backend Coverage Report
uses: actions/download-artifact@v7
with:
artifact-ids: ${{ needs.test-backend.outputs.coverage-artifact-id }}
path: coverages/backend/
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: coverages/backend/lcov.info
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ target
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

.env
23 changes: 23 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
PROPRIETARY LICENSE

Copyright (c) 2025 Geo Engine GmbH. All rights reserved.

This repository and its entire content, including all code, documentation, and related assets (collectively, the "Software"), are the proprietary intellectual property of Geo Engine GmbH.

The Software is not licensed under an Open Source initiative.

Permitted Actions:
Users of this public GitHub repository are hereby granted a limited, non-exclusive right to:
1. View the Software and its history via the GitHub web interface.
2. Fork the repository for the sole purpose of viewing and personal study within the GitHub platform.
3. Clone the repository for the sole purpose of viewing and personal study.

Prohibited Actions:
Any unauthorized use, reproduction, modification, distribution, commercial exploitation, or public performance of the Software, or any derivative works based on the Software, is strictly prohibited without the express prior written permission of Geo Engine GmbH.

This includes, but is not limited to:
* Using any part of the code in a software application, service, or product.
* Distributing copies of the code, in original or modified form.
* Reverse engineering the Software.

Geo Engine GmbH reserves all rights not expressly granted in this document. The Software is provided "AS IS," without warranty of any kind, express or implied.
10 changes: 10 additions & 0 deletions backend/.sqlfluff
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[sqlfluff]
dialect = postgres
templater = jinja
sql_file_exts = .sql
large_file_skip_byte_limit = 40000

[sqlfluff:rules:references.keywords]
# Words that are not-reserved in <https://www.postgresql.org/docs/current/sql-keywords-appendix.html>
ignore_words =
name
1 change: 1 addition & 0 deletions backend/.sqlfluffignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/
Loading
Loading