Skip to content

Commit 60551e9

Browse files
authored
ci(pre-commit): Install dependencies needed for cargo test (#441)
* Revert "fix(template): Run commands in a nix-shell to automatically pull the necessary dependencies" This reverts commit 56f72e0. * ci(pre-commit): install dependencies needed for cargo test
1 parent 932368c commit 60551e9

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

template/.github/workflows/pr_pre-commit.yaml.j2

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ jobs:
1313
pre-commit:
1414
runs-on: ubuntu-latest
1515
steps:
16+
- name: Install host dependencies
17+
uses: awalsh128/cache-apt-pkgs-action@a6c3917cc929dd0345bfb2d3feaf9101823370ad # v1.4.2
18+
with:
19+
packages: protobuf-compiler krb5-user libkrb5-dev libclang-dev liblzma-dev libssl-dev pkg-config apt-transport-https
20+
version: ubuntu-latest
1621
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
1722
with:
1823
fetch-depth: 0
@@ -40,7 +45,6 @@ jobs:
4045
chmod 700 "${LOCATION_BIN}"
4146

4247
echo "$LOCATION_DIR" >> "$GITHUB_PATH"
43-
- uses: cachix/install-nix-action@8887e596b4ee1134dae06b98d573bd674693f47c # v26
4448
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
4549
with:
4650
extra_args: "--from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}"

template/.pre-commit-config.yaml.j2

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ repos:
6666
- id: regenerate-charts
6767
name: regenerate-charts
6868
language: system
69-
entry: nix-shell --run 'make regenerate-charts'
69+
entry: make regenerate-charts
7070
stages: [commit, merge-commit, manual]
7171
pass_filenames: false
7272

7373
- id: cargo-test
7474
name: cargo-test
7575
language: system
76-
entry: nix-shell --run 'cargo test'
76+
entry: cargo test
7777
stages: [commit, merge-commit, manual]
7878
pass_filenames: false

0 commit comments

Comments
 (0)