aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
diff options
context:
space:
mode:
authorOnur Gündüz <ogunduz@gmail.com>2026-09-29 14:44:47 +0200
committerOnur Gündüz <ogunduz@gmail.com>2026-09-29 14:44:47 +0200
commitf2d3b7b4ae6345c8579008c9deb3e63ba50997af (patch)
treead2f99c245f7ee9278eed65bef0180c1b4ab0683 /.github/workflows/ci.yml
parentcf5358473839638940dcf43f83fe3afe298cf112 (diff)
downloadele-f2d3b7b4ae6345c8579008c9deb3e63ba50997af.tar.gz
ele-f2d3b7b4ae6345c8579008c9deb3e63ba50997af.zip
Declare tested Rust minimum and add release CI checks
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r--.github/workflows/ci.yml55
1 files changed, 55 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..0285c9d
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,55 @@
+name: CI
+
+on:
+ push:
+ pull_request:
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+jobs:
+ test:
+ name: Test (${{ matrix.os }}, Rust ${{ matrix.rust }})
+ runs-on: ${{ matrix.os }}
+ timeout-minutes: 20
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-latest, macos-latest, windows-latest]
+ rust: ["1.88.0", stable]
+ steps:
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
+ with:
+ persist-credentials: false
+ - name: Install Rust
+ run: rustup toolchain install ${{ matrix.rust }} --profile minimal
+ - name: Test default dependencies
+ run: cargo +${{ matrix.rust }} test --locked
+ - name: Test arbitrary-precision JSON compatibility
+ run: cargo +${{ matrix.rust }} test --locked --features serde_json/arbitrary_precision
+ - name: Test release build
+ run: cargo +${{ matrix.rust }} test --release --locked
+
+ quality:
+ runs-on: ubuntu-latest
+ timeout-minutes: 20
+ steps:
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
+ with:
+ persist-credentials: false
+ - name: Install Rust tools
+ run: rustup toolchain install stable --profile minimal --component rustfmt --component clippy
+ - name: Check formatting
+ run: cargo +stable fmt --all -- --check
+ - name: Check lints
+ run: cargo +stable clippy --all-targets --locked -- -D warnings
+ - name: Check feature compatibility lints
+ run: cargo +stable clippy --all-targets --locked --features serde_json/arbitrary_precision -- -D warnings
+ - name: Verify package
+ run: cargo +stable package --locked
+ - name: Test packaged crate
+ shell: bash
+ run: |
+ package=$(cargo +stable metadata --no-deps --format-version 1 | python3 -c 'import json, sys; p = json.load(sys.stdin)["packages"][0]; print(p["name"] + "-" + p["version"])')
+ cargo +stable test --locked --manifest-path "target/package/$package/Cargo.toml"