mirror of
https://github.com/maplibre/martin.git
synced 2024-12-19 04:41:46 +03:00
Move some build commands to CI (#1101)
This commit is contained in:
parent
3939619e11
commit
c8df2799db
@ -6,6 +6,9 @@
|
|||||||
echo "----------------------------------------------------------------------------------------"
|
echo "----------------------------------------------------------------------------------------"
|
||||||
echo "These tests run automatically before the git push"
|
echo "These tests run automatically before the git push"
|
||||||
echo "If you want to push your changes without testing them first, use git push --no-verify"
|
echo "If you want to push your changes without testing them first, use git push --no-verify"
|
||||||
|
echo "To simplify this, create an alias, e.g. like so:"
|
||||||
|
echo " git config --global alias.pushn 'push --no-verify'"
|
||||||
|
echo "Then you can use git pushn to push without testing"
|
||||||
echo "----------------------------------------------------------------------------------------"
|
echo "----------------------------------------------------------------------------------------"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
@ -49,24 +49,18 @@ jobs:
|
|||||||
postgis/postgis:16-3.4
|
postgis/postgis:16-3.4
|
||||||
-c "exec docker-entrypoint.sh postgres -c ssl=on -c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem -c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key"
|
-c "exec docker-entrypoint.sh postgres -c ssl=on -c ssl_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem -c ssl_key_file=/etc/ssl/private/ssl-cert-snakeoil.key"
|
||||||
steps:
|
steps:
|
||||||
|
- uses: taiki-e/install-action@v2
|
||||||
|
with:
|
||||||
|
tool: just
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Rust Versions
|
|
||||||
run: rustc --version && cargo --version
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch'
|
if: github.event_name != 'release' && github.event_name != 'workflow_dispatch'
|
||||||
- run: cargo fmt --all -- --check
|
- run: just env-info
|
||||||
- run: cargo clippy --package martin-tile-utils --tests --lib --bins --benches -- -D warnings
|
- run: just fmt
|
||||||
- run: cargo clippy --package mbtiles --tests --lib --bins --benches --no-default-features -- -D warnings
|
- run: just clippy
|
||||||
- run: cargo clippy --package mbtiles --tests --lib --bins --benches -- -D warnings
|
- run: just check
|
||||||
- run: cargo clippy --package martin --tests --lib --bins --benches -- -D warnings
|
- run: just check-doc
|
||||||
- run: RUSTFLAGS='-D warnings' cargo check --package martin --tests --lib --bins --benches --no-default-features
|
|
||||||
- run: RUSTFLAGS='-D warnings' cargo check --package martin --tests --lib --bins --benches --no-default-features --features fonts
|
|
||||||
- run: RUSTFLAGS='-D warnings' cargo check --package martin --tests --lib --bins --benches --no-default-features --features sprites
|
|
||||||
- run: cargo clippy --package martin --features bless-tests -- -D warnings
|
|
||||||
- run: cargo doc --no-deps --workspace
|
|
||||||
env:
|
|
||||||
RUSTDOCFLAGS: '-D warnings'
|
|
||||||
- name: Init database
|
- name: Init database
|
||||||
run: tests/fixtures/initdb.sh
|
run: tests/fixtures/initdb.sh
|
||||||
env:
|
env:
|
||||||
|
9
justfile
9
justfile
@ -275,10 +275,13 @@ fmt2:
|
|||||||
check:
|
check:
|
||||||
cargo check --workspace --all-targets --bins --tests --lib --benches
|
cargo check --workspace --all-targets --bins --tests --lib --benches
|
||||||
|
|
||||||
|
# Verify doc build
|
||||||
|
check-doc:
|
||||||
|
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --workspace
|
||||||
|
|
||||||
# Run cargo clippy
|
# Run cargo clippy
|
||||||
clippy:
|
clippy:
|
||||||
cargo clippy --workspace --all-targets --bins --tests --lib --benches -- -D warnings
|
cargo clippy --workspace --all-targets --bins --tests --lib --benches -- -D warnings
|
||||||
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --workspace
|
|
||||||
|
|
||||||
# Validate markdown URLs with markdown-link-check
|
# Validate markdown URLs with markdown-link-check
|
||||||
clippy-md:
|
clippy-md:
|
||||||
@ -286,8 +289,7 @@ clippy-md:
|
|||||||
'echo -e "/workdir/README.md\n$(find /workdir/docs/src -name "*.md")" | tr "\n" "\0" | xargs -0 -P 5 -n1 -I{} markdown-link-check --config /workdir/.github/files/markdown.links.config.json {}'
|
'echo -e "/workdir/README.md\n$(find /workdir/docs/src -name "*.md")" | tr "\n" "\0" | xargs -0 -P 5 -n1 -I{} markdown-link-check --config /workdir/.github/files/markdown.links.config.json {}'
|
||||||
|
|
||||||
# These steps automatically run before git push via a git hook
|
# These steps automatically run before git push via a git hook
|
||||||
[private]
|
git-pre-push: env-info restart fmt clippy check check-doc test
|
||||||
git-pre-push: env-info restart lint test
|
|
||||||
|
|
||||||
# Get environment info
|
# Get environment info
|
||||||
[private]
|
[private]
|
||||||
@ -296,6 +298,7 @@ env-info:
|
|||||||
{{ just_executable() }} --version
|
{{ just_executable() }} --version
|
||||||
rustc --version
|
rustc --version
|
||||||
cargo --version
|
cargo --version
|
||||||
|
rustup --version
|
||||||
|
|
||||||
# Update sqlite database schema.
|
# Update sqlite database schema.
|
||||||
prepare-sqlite: install-sqlx
|
prepare-sqlite: install-sqlx
|
||||||
|
Loading…
Reference in New Issue
Block a user