diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41b28b0..32df88e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,14 @@ jobs: id: toolchain with: components: clippy + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }} - run: cargo clippy --tests --no-deps -- -D warnings format: @@ -41,6 +49,14 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@1.86.0 id: toolchain + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }} - run: cargo test corpus: @@ -54,6 +70,14 @@ jobs: - uses: tree-sitter/setup-action/cli@v1 - uses: dtolnay/rust-toolchain@1.86.0 id: toolchain + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }} - name: Compile run: | @@ -99,6 +123,14 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@1.86.0 id: toolchain + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }} - name: Check schema generation run: | # Generate schema