diff --git a/.github/actions/run-coverage/action.yml b/.github/actions/run-coverage/action.yml index 0eafc859..0e2b888e 100644 --- a/.github/actions/run-coverage/action.yml +++ b/.github/actions/run-coverage/action.yml @@ -11,9 +11,7 @@ runs: using: "composite" steps: - name: Install Task - shell: bash - run: | - sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin + uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0 - name: Install reportgenerator shell: bash diff --git a/.github/workflows/check-examples.yml b/.github/workflows/check-examples.yml index d9a70d85..eefe05c6 100644 --- a/.github/workflows/check-examples.yml +++ b/.github/workflows/check-examples.yml @@ -32,7 +32,7 @@ jobs: python-version: "3.12" - name: Install Task - run: sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin + uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0 - name: Build Valkey.Glide run: task build target=lib diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index eedac611..0d603737 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,37 +14,43 @@ permissions: jobs: lint: runs-on: ubuntu-latest - timeout-minutes: 20 + timeout-minutes: 10 steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: submodules: true - - name: Install Rust toolchain + - name: Install Rust uses: ./.github/actions/install-rust - name: Cache Rust uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: path: rust/target - key: rust-x86_64-unknown-linux-gnu + # Use 'Cargo.toml' hash so the cache invalidates when dependencies change. + key: rust-lint-${{ hashFiles('rust/Cargo.toml') }} + # On cache miss, restore the most recent cache with this prefix so cargo + # only recompiles changed dependencies instead of building from scratch. + restore-keys: rust-lint- - name: Install cargo-deny - run: cargo install --locked cargo-deny + uses: taiki-e/install-action@735e5933943122c5ac182670a935f54a949265c1 # v2.52.4 + with: + tool: cargo-deny@0.19 + + - name: Install actionlint + run: | + curl -fsSL https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_linux_amd64.tar.gz | tar xz -C /usr/local/bin actionlint - name: Install dotnet uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0 with: dotnet-version: "8" - - name: Install actionlint - run: | - ACTIONLINT_URL=https://github.com/rhysd/actionlint/releases/download/v1.7.12/actionlint_1.7.12_linux_amd64.tar.gz - curl -fsSL "$ACTIONLINT_URL" | tar xz -C /usr/local/bin actionlint - - name: Install Task - run: sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin + uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0 - - name: Lint + - name: Run lint run: task lint diff --git a/Taskfile.yml b/Taskfile.yml index eeb6cd56..a4b825b9 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -229,7 +229,7 @@ tasks: format:yaml: desc: "Run YAML formatting" - cmd: npx prettier --write "**/*.yml" + cmd: npx prettier --write --cache "**/*.yml" format:markdown: desc: "Run Markdown formatting"