chore: apply rustfmt #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
# ensure that the workflow is only triggered once per PR, subsequent pushes to the PR will cancel | ||
# and restart the workflow. See https://docs.github.com/en/actions/using-jobs/using-concurrency | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
env: | ||
RUST_BACKTRACE: 1 | ||
RUST_TEST_THREADS: 1 | ||
CARGO_TERM_COLOR: always | ||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Cache dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Install taplo | ||
uses: baptiste0928/cargo-install@v3 | ||
with: | ||
crate: taplo-cli | ||
- name: Check format | ||
run: | | ||
cargo fmt --all -- --check | ||
cargo clippy --all-targets -- -D warnings | ||
- name: Check typos | ||
uses: crate-ci/typos@master | ||
- name: Check toml format | ||
run: taplo validate --colors never --no-schema | ||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
defaults: | ||
run: | ||
working-directory: ./packages/hub | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: taiki-e/install-action@v2 | ||
with: | ||
tool: nextest | ||
- name: Cache dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Run migration tests | ||
run: cargo nextest run | ||
- name: Run tests | ||
run: cargo nextest run | ||
- name: Publish Test Report | ||
uses: mikepenz/action-junit-report@v4 | ||
if: success() || failure() # always run even if the previous step fails | ||
with: | ||
report_paths: '**/target/nextest/default/junit.xml' | ||
# empty job for branch protection | ||
ci-check: | ||
runs-on: ubuntu-latest | ||
needs: [lint, test] | ||
timeout-minutes: 1 |