Repository navigation
79 lines (79 loc) · 2.62 KB
/
Copy pathci.yml
File metadata and controls
79 lines (79 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Rust CI
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
concurrency:
group: rust-ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: make help
- name: Prepare SQLite schema for query checking
run: python3 .github/scripts/sqlite-query-check.py prepare
env:
GFA_SQLX_WORK_DIR: ${{ runner.temp }}/gfa-sqlx
- run: cargo check -p gfa-store --no-default-features --features sqlite --locked
env:
DATABASE_URL: sqlite:${{ runner.temp }}/gfa-sqlx/schema.sqlite
SQLX_OFFLINE_DIR: ${{ runner.temp }}/gfa-sqlx/queries
- name: Verify offline query metadata
run: python3 .github/scripts/sqlite-query-check.py verify
env:
GFA_SQLX_WORK_DIR: ${{ runner.temp }}/gfa-sqlx
- run: make test-rust
env:
SQLX_OFFLINE: "true"
- run: cargo test -p gfa-cli --locked
- run: make build-server
- run: python3 .github/scripts/local-server-smoke.py
- run: python3 .github/scripts/mcp-stdio-smoke.py
- name: Export generated OpenAPI
run: cargo run -p gfa-http --example export-openapi --locked > target/openapi.json
- uses: actions/upload-artifact@v4
with:
name: openapi
path: target/openapi.json
- run: make check-deps
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: make format-check-rust
- run: make lint-rust
dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@cargo-deny
- run: cargo deny --locked check
core-api:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@cargo-semver-checks
- name: Check core compatibility against the PR base
if: github.event_name == 'pull_request'
env:
BASE_REF: ${{ github.event.pull_request.base.sha }}
run: |
if git cat-file -e "$BASE_REF:crates/core/gfa-core/Cargo.toml"; then
cargo semver-checks check-release -p gfa-core --baseline-rev "$BASE_REF"
else
echo "Initial core API: no baseline crate exists yet."
fi