Skip to content
Open
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
66 changes: 66 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: CI

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
submodules: true
- run: rustup toolchain install stable --profile minimal --component rustfmt,clippy --target thumbv7em-none-eabihf && rustup default stable
- run: cargo fmt --all --check
- run: cargo run -p codegen --locked -- --check
- run: cargo clippy --workspace --all-targets --all-features --locked
- run: cargo build -p openfga-model --target thumbv7em-none-eabihf --locked
- run: cargo doc --no-deps --all-features --locked
env:
RUSTDOCFLAGS: -D warnings
- run: cargo test --workspace --all-features --locked

msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- run: rustup toolchain install 1.88 --profile minimal && rustup default 1.88
- run: cargo check -p openfga-model --lib --locked

coverage:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
env:
RUSTFLAGS: ""
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
submodules: true
- run: rustup toolchain install nightly --profile minimal --component llvm-tools-preview && rustup default nightly
- uses: taiki-e/install-action@b80e2bb2635f28eb98b9fce1e2f0887e1535c6b2 # v2.90.0
with:
tool: cargo-llvm-cov
- run: mkdir -p target/coverage
- run: cargo llvm-cov -p openfga-model --all-targets --all-features --locked --no-report
- run: cargo llvm-cov -p openfga-model --doc --all-features --locked --no-clean --lcov --output-path target/coverage/coverage.lcov
- uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
if: github.actor != 'dependabot[bot]' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
with:
files: target/coverage/coverage.lcov
fail_ci_if_error: true
use_oidc: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "conformance/openfga-language"]
path = conformance/openfga-language
url = https://github.com/openfga/language
Loading