Skip to content

Commit

Permalink
fix: ci working dir
Browse files Browse the repository at this point in the history
  • Loading branch information
giac-mysten committed Jun 17, 2024
1 parent f445817 commit 10f066c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ jobs:
needs: diff
if: ${{ needs.diff.outputs.isRust == 'true' }}
runs-on: ubuntu-ghcloud
working-dir: ./site-builder
steps:
- uses: actions/checkout@v4
- uses: Swatinem/[email protected]
Expand All @@ -85,30 +84,35 @@ jobs:
--rev 55ec89082466f6bb246d870a8d56d166a8e1f08b
- name: Check formatting with rustfmt
working-dir: ./site-builder
run: >
cargo fmt --all -- --check
--config group_imports=StdExternalCrate,imports_granularity=Crate,imports_layout=HorizontalVertical
- name: Check sorting of dependencies
working-dir: ./site-builder
run: cargo sort -w -c
- name: Lint using clippy (w/o tests)
working-dir: ./site-builder
run: cargo clippy --all-features --no-deps -- -D warnings
- name: Lint using clippy (w/ tests)
working-dir: ./site-builder
run: cargo clippy --all-features --tests --no-deps -- -D warnings
- name: Check documentation
working-dir: ./site-builder
run: cargo doc --no-deps --workspace

build:
name: Build Rust code
needs: diff
if: ${{ needs.diff.outputs.isRust == 'true' }}
runs-on: ubuntu-ghcloud
working-dir: ./site-builder
steps:
- uses: actions/checkout@v4
- uses: Swatinem/[email protected]
with:
save-if: ${{ github.ref == 'refs/heads/main' && 'true' || 'false' }}
- name: Build Rust code
working-dir: ./site-builder
run: cargo build --verbose

# TODO(mlegner): Currently running all tests on all PRs touching Rust code.
Expand All @@ -118,13 +122,13 @@ jobs:
needs: diff
if: ${{ needs.diff.outputs.isRust == 'true' }}
runs-on: ubuntu-ghcloud
working-dir: ./site-builder
steps:
- uses: actions/checkout@v4
- uses: Swatinem/[email protected]
with:
save-if: ${{ github.ref == 'refs/heads/main' && 'true' || 'false' }}
- name: Run tests
working-dir: ./site-builder
run: cargo test -- --include-ignored
check-all:
name: Check if all code checks succeeded
Expand Down

0 comments on commit 10f066c

Please sign in to comment.