Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

Commit e8549af

Browse files
authored
chore(ci): address CI linting findings (#529)
1 parent f074889 commit e8549af

3 files changed

Lines changed: 40 additions & 13 deletions

File tree

.github/dependabot.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,14 @@ updates:
55
schedule:
66
interval: "daily"
77
time: "12:00"
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "monthly"
12+
time: "12:00"
13+
cooldown:
14+
default-days: 7
15+
groups:
16+
github-actions:
17+
patterns:
18+
- "*"

.github/workflows/ci.yaml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,20 @@ on:
99
pull_request:
1010
branches: [main]
1111

12+
permissions: {}
13+
1214
jobs:
1315
check:
1416
name: Check
1517
runs-on: ubuntu-latest
1618
steps:
17-
- uses: extractions/setup-just@v1
19+
- uses: extractions/setup-just@69d82fb0233557aec017ef13706851d0694e0f1d # v1.6.0
1820
env:
1921
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20-
- uses: actions/checkout@v3
21-
- uses: actions/setup-python@v4
22+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
23+
with:
24+
persist-credentials: false
25+
- uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
2226
with:
2327
python-version: "3.11"
2428
cache: "pip"
@@ -34,7 +38,9 @@ jobs:
3438
name: Generate test versions
3539
runs-on: ubuntu-latest
3640
steps:
37-
- uses: actions/checkout@v3
41+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
42+
with:
43+
persist-credentials: false
3844
- name: Install dependencies
3945
run: |
4046
sudo apt-get install -y ripgrep
@@ -51,7 +57,7 @@ jobs:
5157
)
5258
# Get the oldest supported version from the pyproject.toml
5359
OLDEST=$(rg -No '"ruff>=(.*)"' -r '$1' pyproject.toml)
54-
UNRELEASED=${{ env.RUFF_UNRELEASED_REF }}
60+
UNRELEASED=${RUFF_UNRELEASED_REF}
5561
5662
echo "::set-output name=latest::$LATEST"
5763
echo "::set-output name=oldest::$OLDEST"
@@ -81,11 +87,13 @@ jobs:
8187

8288
runs-on: ${{ matrix.os }}
8389
steps:
84-
- uses: extractions/setup-just@v1
90+
- uses: extractions/setup-just@69d82fb0233557aec017ef13706851d0694e0f1d # v1.6.0
8591
env:
8692
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87-
- uses: actions/checkout@v3
88-
- uses: actions/setup-python@v4
93+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
94+
with:
95+
persist-credentials: false
96+
- uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
8997
with:
9098
python-version: ${{ matrix.python-version }}
9199
cache: "pip"
@@ -102,15 +110,19 @@ jobs:
102110
- name: Install test Ruff version from PyPI
103111
if: ${{ matrix.ruff-version != env.RUFF_UNRELEASED_REF }}
104112
run: |
105-
pip install ruff==${{ matrix.ruff-version }}
113+
pip install ruff==${RUFF_VERSION}
106114
ruff --version
115+
env:
116+
RUFF_VERSION: ${{ matrix.ruff-version }}
107117

108118
- name: "Install test Ruff version from GitHub"
109119
if: ${{ matrix.ruff-version == env.RUFF_UNRELEASED_REF }}
110120
run: |
111-
pip install --force-reinstall git+https://github.com/astral-sh/ruff@${{ matrix.ruff-version }}
121+
pip install --force-reinstall git+https://github.com/astral-sh/ruff@${RUFF_VERSION}
112122
pip show ruff
113123
ruff version
124+
env:
125+
RUFF_VERSION: ${{ matrix.ruff-version }}
114126

115127
- name: Run tests
116128
run: just test

.github/workflows/release.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,24 @@ on:
77
env:
88
PYTHON_VERSION: "3.11"
99

10+
permissions: {}
11+
1012
jobs:
1113
release:
1214
runs-on: "ubuntu-latest"
1315
steps:
14-
- uses: actions/checkout@v3
15-
- uses: actions/setup-python@v4
16+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
17+
with:
18+
persist-credentials: false
19+
- uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
1620
with:
1721
python-version: ${{ env.PYTHON_VERSION }}
1822
- name: Install Hatch
1923
run: python3 -m pip install hatch
2024
- name: Install dependencies
2125
run: hatch build
2226
- name: Publish to PyPi
23-
if: "startsWith(github.ref, 'refs/tags/')"
27+
if: startsWith(github.ref, 'refs/tags/')
2428
env:
2529
HATCH_INDEX_USER: __token__
2630
HATCH_INDEX_AUTH: ${{ secrets.RUFF_LSP_TOKEN }}

0 commit comments

Comments
 (0)