xdbm/.github/workflows/rust.yml
qwjyh 47b3a5e69d
fix: polluting gitconfig in integrated test (#20)
* fix: polluting gitconfig in integrated test

* debug(CI): add eprintln

* debug(CI): git config

* debug(CI): git init test

* fix(CI): command construction

* debug(CI): change workdir & add same config setup

* debug(CI): use libgit2

* debug(CI): return err at the end of test using libgit2

* debug(CI): change current_dir in git config

* fix(git): git config now gets local config

CI was failing since xdbm init didn't get local git config.

* debug: add trace log

* debug: increase log level in CI

* fix: getting gitconfig now respects local config

* debug(CI): clean up debugging codes

* fix(CI): add setup_gitconfig to two_devices test

* debug(CI): inspect git config

* fix(CI): add env var to allow setting git global config

* refactor(CI): remove unnecessary arg for setup_gitconfig

* update changelog
2025-02-09 08:39:57 +09:00

27 lines
492 B
YAML

name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
XDBM_ENABLE_OVERWRITE_GITCONFIG: true
jobs:
build-and-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
run: rustup component add clippy
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Lint
run: cargo clippy --all-targets --all-features