diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..47f88349 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "cargo" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9fd45e09..4d91e2e4 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,12 +11,56 @@ env: jobs: build: - runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Cache Cargo registry + uses: actions/cache@v3 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-registry- + - name: Cache Cargo index + uses: actions/cache@v3 + with: + path: ~/.cargo/git + key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-index- + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable - name: Build run: cargo build --verbose + + test: + runs-on: ubuntu-latest + needs: build + + steps: + - uses: actions/checkout@v4 + - name: Cache Cargo registry + uses: actions/cache@v3 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-registry- + - name: Cache Cargo index + uses: actions/cache@v3 + with: + path: ~/.cargo/git + key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-index- + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable - name: Run tests run: cargo test --verbose + - name: Replace linutil binary + run: cp target/debug/linutil ./linutil \ No newline at end of file