Skip to content

Commit f5a0e35

Browse files
committed
clean
1 parent c526302 commit f5a0e35

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

example/.github/workflows/ci.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ jobs:
2020
with:
2121
python-version: "3.10"
2222

23+
- name: Set shfmt version environment variable
24+
run: echo "SHFMT_VERSION=v3.7.0" >> $GITHUB_ENV
25+
2326
- name: Cache pip dependencies
2427
uses: actions/cache@v3
2528
with:
@@ -32,18 +35,18 @@ jobs:
3235
uses: actions/cache@v3
3336
with:
3437
path: /usr/local/bin/shfmt
35-
# key: ${{ runner.os }}-shfmt-${{ env.SHFMT_VERSION }}
36-
key: ${{ runner.os }}-shfmt-
38+
key: ${{ runner.os }}-shfmt-${{ env.SHFMT_VERSION }}
3739
restore-keys: |
40+
${{ runner.os }}-shfmt-${{ env.SHFMT_VERSION }}
3841
${{ runner.os }}-shfmt-
3942
4043
- name: Cache Pre-Commit environments
4144
uses: actions/cache@v3
4245
with:
4346
path: ~/.cache/pre-commit
44-
# key: ${{ runner.os }}-pc-${{ hashFiles('.pre-commit-config.yaml') }}
45-
key: ${{ runner.os }}-pc-
47+
key: ${{ runner.os }}-pc-${{ hashFiles('.pre-commit-config.yaml') }}
4648
restore-keys: |
49+
${{ runner.os }}-pc-${{ hashFiles('.pre-commit-config.yaml') }}
4750
${{ runner.os }}-pc-
4851
4952
- name: Install dependencies
@@ -53,7 +56,7 @@ jobs:
5356
5457
- name: Install shfmt
5558
run: |
56-
SHFMT_VERSION="v3.7.0"
59+
SHFMT_VERSION=${{ env.SHFMT_VERSION }}
5760
SHFMT_BIN="shfmt_${SHFMT_VERSION}_linux_amd64"
5861
if [[ ! -f /usr/local/bin/shfmt ]]; then
5962
wget -O shfmt "https://github.com/mvdan/sh/releases/download/${SHFMT_VERSION}/${SHFMT_BIN}"

0 commit comments

Comments
 (0)