Skip to content

Commit 96c4f92

Browse files
authored
Merge pull request #982 from netenglabs/update-actions-0-23
Actions: fix deprecations
2 parents ff56b88 + 346b384 commit 96c4f92

File tree

4 files changed

+37
-76
lines changed

4 files changed

+37
-76
lines changed

.github/workflows/integration-tests.yml

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -20,31 +20,19 @@ jobs:
2020
python-version: [3.8, 3.9]
2121
group: [1, 2, 3, 4]
2222
steps:
23-
- uses: actions/checkout@v2
2423

25-
- name: Set up Python ${{ matrix.python-version }}
26-
uses: actions/setup-python@v2
27-
with:
28-
python-version: ${{ matrix.python-version }}
24+
- uses: actions/checkout@v4
2925

30-
- name: Install Poetry
31-
uses: snok/install-poetry@v1
32-
with:
33-
virtualenvs-create: true
34-
virtualenvs-in-project: true
26+
- name: Install poetry
27+
run: pipx install poetry==1.*
3528

36-
- name: Load cached venv
37-
id: cached-poetry-dependencies
38-
uses: actions/cache@v2
29+
- name: Set up Python ${{ matrix.python-version }}
30+
uses: actions/setup-python@v5
3931
with:
40-
path: .venv
41-
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}
42-
43-
- name: Install dependencies
44-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
45-
run: poetry install --no-interaction --no-root
32+
python-version: ${{ matrix.python-version }}
33+
cache: 'poetry'
4634

47-
- name: Install library
35+
- name: Install dependencies and library
4836
run: poetry install --no-interaction
4937

5038
- name: Set up suzieq config
@@ -57,7 +45,7 @@ jobs:
5745
run: mkdir test_durations
5846

5947
- name: Get durations from cache
60-
uses: actions/cache@v2
48+
uses: actions/cache@v4
6149
with:
6250
path: test_durations
6351
# artificial cache miss to always save at the end of the job and avoid out of sync test runs
@@ -69,7 +57,7 @@ jobs:
6957
run: poetry run pytest --splits 4 --group ${{ matrix.group }} --store-durations --durations-path test_durations/.test_durations_${{ matrix.python-version }}
7058

7159
- name: Upload partial durations
72-
uses: actions/upload-artifact@v2
60+
uses: actions/upload-artifact@v4
7361
with:
7462
retention-days: 1
7563
name: duration-chunk-${{ matrix.group }}-python-${{ matrix.python-version }}
@@ -81,10 +69,10 @@ jobs:
8169
needs: test
8270
steps:
8371
- name: Checkout
84-
uses: actions/checkout@v2
72+
uses: actions/checkout@v4
8573

8674
- name: Get durations from cache
87-
uses: actions/cache@v2
75+
uses: actions/cache@v4
8876
with:
8977
path: test_durations
9078
# artificial cache miss to always save at the end of the job and avoid out of sync test runs
@@ -93,7 +81,7 @@ jobs:
9381
test-durations
9482
9583
- name: Download artifacts
96-
uses: actions/download-artifact@v2
84+
uses: actions/download-artifact@v4
9785

9886
- name: Merge test durations
9987
run: python3 tests/utilities/merge_test_durations_ci.py

.github/workflows/linting.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/pre-commit.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,21 @@ on:
1515
jobs:
1616
pre-commit:
1717
runs-on: ubuntu-latest
18-
1918
steps:
20-
- uses: actions/checkout@v2
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Install poetry
23+
run: pipx install poetry==1.*
2124

2225
- name: Set up Python 3.8
23-
uses: actions/setup-python@v2
26+
uses: actions/setup-python@v5
2427
with:
2528
python-version: '3.8'
26-
architecture: 'x64'
29+
cache: 'poetry'
30+
31+
- name: Install dependencies and library
32+
run: poetry install --no-interaction
2733

2834
- name: Install pre-commit
2935
run: pip install pre-commit

.pre-commit-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,17 @@ repos:
88
hooks:
99
- id: end-of-file-fixer
1010
- id: mixed-line-ending
11+
- repo: local
12+
hooks:
13+
- id: system
14+
name: Pylint
15+
entry: poetry run pylint -j 0 suzieq
16+
pass_filenames: false
17+
language: system
18+
- repo: local
19+
hooks:
20+
- id: system
21+
name: Flake8
22+
entry: poetry run flake8 suzieq
23+
pass_filenames: false
24+
language: system

0 commit comments

Comments
 (0)