Skip to content

Commit 2c0ffa7

Browse files
committed
🆙 Upgrade worflow action version
1 parent f3770b8 commit 2c0ffa7

File tree

6 files changed

+112
-112
lines changed

6 files changed

+112
-112
lines changed

.github/workflows/flake.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Set up Python environment
1313
uses: actions/setup-python@v2
1414
with:
15-
python-version: "3.10"
15+
python-version: "3.12"
1616
- name: Lint
1717
uses: py-actions/flake8@v2
1818
with:

.github/workflows/pdoc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- uses: actions/checkout@v3
2424
- uses: actions/setup-python@v4
2525
with:
26-
python-version: "3.11"
26+
python-version: "3.12"
2727

2828
- run: pip install -e .
2929
- run: pip install -r docs/requirements.txt

.github/workflows/pydocstyle.yaml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@ jobs:
66
pydoc-lint:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
10-
- name: Set up Python 3.9
11-
uses: actions/setup-python@v1
12-
with:
13-
python-version: 3.9
14-
- name: Install
15-
run: |
16-
python -m pip install --upgrade pip
17-
pip install pydocstyle
18-
pip install -e .
19-
- name: Analysing the code with pydocstyle
20-
run: |
21-
pydocstyle --convention=numpy . | tee pydocstyle.txt
22-
- name: Check the number of errors
23-
run: |
24-
n_errors=$(wc -l < pydocstyle.txt)
25-
echo "Number of errors in docstrings: $n_errors"
26-
python github_actions_utils/pydocstyle_manager.py --n_errors=$n_errors
9+
- uses: actions/checkout@v2
10+
- name: Set up Python 3.12
11+
uses: actions/setup-python@v1
12+
with:
13+
python-version: 3.12
14+
- name: Install
15+
run: |
16+
python -m pip install --upgrade pip
17+
pip install pydocstyle
18+
pip install -e .
19+
- name: Analysing the code with pydocstyle
20+
run: |
21+
pydocstyle --convention=numpy . | tee pydocstyle.txt
22+
- name: Check the number of errors
23+
run: |
24+
n_errors=$(wc -l < pydocstyle.txt)
25+
echo "Number of errors in docstrings: $n_errors"
26+
python github_actions_utils/pydocstyle_manager.py --n_errors=$n_errors

.github/workflows/pylint.yaml

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -6,47 +6,47 @@ jobs:
66
pylint-lint:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
10-
- name: Set up Python 3.9
11-
uses: actions/setup-python@v1
12-
with:
13-
python-version: 3.9
14-
- name: Cache installation
15-
uses: actions/cache@v1
16-
id: cache
17-
with:
18-
path: ~/.cache/pip
19-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
20-
restore-keys: |
21-
${{ runner.os }}-pip-
22-
- name: Install
23-
run: |
24-
python -m pip install --upgrade pip
25-
pip install -r requirements-dev.txt
26-
pip install pylint pylint-django
27-
pip install -e .
28-
- name: Analysing the code with pylint
29-
run: |
30-
pylint --rcfile=.pylintrc --output-format=text $(git ls-files '*.py') | tee .pylint.txt
31-
- name: Handle pylint results
32-
run: |
33-
score=$(sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' .pylint.txt)
34-
echo "Pylint score was $score"
35-
color=$(python3 -m github_actions_utils.pylint_manager --score=$score)
36-
echo "PYLINT_COLOR=$color"
37-
echo "PYLINT_COLOR=$color" >> $GITHUB_ENV
38-
echo "PYLINT_SCORE=$score/10.00"
39-
echo "PYLINT_SCORE=$score/10.00" >> $GITHUB_ENV
40-
- name: Create Pylint Badge
41-
uses: schneegans/dynamic-badges-action@v1.1.0
42-
with:
43-
auth: ${{ secrets.GIST_SECRET }}
44-
gistID: ab12676c87f0eaa715bef0f8ad31a604
45-
filename: cliconfig_pylint.json
46-
label: Pylint
47-
message: ${{ env.PYLINT_SCORE }}
48-
color: ${{ env.PYLINT_COLOR }}
49-
style: flat
50-
namedLogo: stylelint
51-
logoColor: '#959DA5'
52-
labelColor: '#343B42'
9+
- uses: actions/checkout@v2
10+
- name: Set up Python 3.12
11+
uses: actions/setup-python@v1
12+
with:
13+
python-version: 3.12
14+
- name: Cache installation
15+
uses: actions/cache@v4
16+
id: cache
17+
with:
18+
path: ~/.cache/pip
19+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
20+
restore-keys: |
21+
${{ runner.os }}-pip-
22+
- name: Install
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install -r requirements-dev.txt
26+
pip install pylint pylint-django
27+
pip install -e .
28+
- name: Analysing the code with pylint
29+
run: |
30+
pylint --rcfile=.pylintrc --output-format=text $(git ls-files '*.py') | tee .pylint.txt
31+
- name: Handle pylint results
32+
run: |
33+
score=$(sed -n 's/^Your code has been rated at \([-0-9.]*\)\/.*/\1/p' .pylint.txt)
34+
echo "Pylint score was $score"
35+
color=$(python3 -m github_actions_utils.pylint_manager --score=$score)
36+
echo "PYLINT_COLOR=$color"
37+
echo "PYLINT_COLOR=$color" >> $GITHUB_ENV
38+
echo "PYLINT_SCORE=$score/10.00"
39+
echo "PYLINT_SCORE=$score/10.00" >> $GITHUB_ENV
40+
- name: Create Pylint Badge
41+
uses: schneegans/dynamic-badges-action@v1.1.0
42+
with:
43+
auth: ${{ secrets.GIST_SECRET }}
44+
gistID: ab12676c87f0eaa715bef0f8ad31a604
45+
filename: cliconfig_pylint.json
46+
label: Pylint
47+
message: ${{ env.PYLINT_SCORE }}
48+
color: ${{ env.PYLINT_COLOR }}
49+
style: flat
50+
namedLogo: stylelint
51+
logoColor: "#959DA5"
52+
labelColor: "#343B42"

.github/workflows/ruff.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ jobs:
1212
- name: Set up Python environment
1313
uses: actions/setup-python@v2
1414
with:
15-
python-version: "3.10"
15+
python-version: "3.12"
1616
- name: Lint
1717
uses: jpetrucciani/ruff-check@main

.github/workflows/tests.yaml

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -6,50 +6,50 @@ jobs:
66
tests:
77
runs-on: ubuntu-latest
88
steps:
9-
- name: Check out source repository
10-
uses: actions/checkout@v2
11-
- name: Set up Python 3.9
12-
uses: actions/setup-python@v1
13-
with:
14-
python-version: 3.9
15-
- name: Cache installation
16-
uses: actions/cache@v1
17-
id: cache
18-
with:
19-
path: ~/.cache/pip
20-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
21-
restore-keys: |
22-
${{ runner.os }}-pip-
23-
- name: Install
24-
run: |
25-
python -m pip install --upgrade pip
26-
pip install -r requirements-dev.txt
27-
pip install pytest pytest-cov
28-
pip install -e .
29-
- name: Test with pytest
30-
run: |
31-
pytest --disable-pytest-warnings --cov-report=term --cov=cliconfig --cov-config=.coveragerc tests/ | tee .pytest.txt
32-
- name: Handle test results
33-
run: |
34-
score=$(cat .pytest.txt | grep TOTAL | tr -s ' ' | cut -d ' ' -f 4)
35-
n_failures=$(cat .pytest.txt | grep failed | cut -d ' ' -f 2)
36-
echo "Pytest finds $n_failures failure(s)"
37-
echo "Tests coverage is $score"
38-
color=$(python3 -m github_actions_utils.pytest_manager --score=$score --n_failures=$n_failures)
39-
echo "PYTEST_COLOR=$color"
40-
echo "PYTEST_COLOR=$color" >> $GITHUB_ENV
41-
echo "PYTEST_SCORE=$score"
42-
echo "PYTEST_SCORE=$score" >> $GITHUB_ENV
43-
- name: Create Coverage Badge
44-
uses: schneegans/dynamic-badges-action@v1.1.0
45-
with:
46-
auth: ${{ secrets.GIST_SECRET }}
47-
gistID: 098e9c7c53be88779ee52ef2f2bc8803
48-
filename: cliconfig_tests.json
49-
label: Coverage
50-
message: ${{ env.PYTEST_SCORE }}
51-
color: ${{ env.PYTEST_COLOR }}
52-
style: flat
53-
namedLogo: codecov
54-
logoColor: '#959DA5'
55-
labelColor: '#343B42'
9+
- name: Check out source repository
10+
uses: actions/checkout@v2
11+
- name: Set up Python 3.12
12+
uses: actions/setup-python@v1
13+
with:
14+
python-version: 3.12
15+
- name: Cache installation
16+
uses: actions/cache@v4
17+
id: cache
18+
with:
19+
path: ~/.cache/pip
20+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
21+
restore-keys: |
22+
${{ runner.os }}-pip-
23+
- name: Install
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install -r requirements-dev.txt
27+
pip install pytest pytest-cov
28+
pip install -e .
29+
- name: Test with pytest
30+
run: |
31+
pytest --disable-pytest-warnings --cov-report=term --cov=cliconfig --cov-config=.coveragerc tests/ | tee .pytest.txt
32+
- name: Handle test results
33+
run: |
34+
score=$(cat .pytest.txt | grep TOTAL | tr -s ' ' | cut -d ' ' -f 4)
35+
n_failures=$(cat .pytest.txt | grep failed | cut -d ' ' -f 2)
36+
echo "Pytest finds $n_failures failure(s)"
37+
echo "Tests coverage is $score"
38+
color=$(python3 -m github_actions_utils.pytest_manager --score=$score --n_failures=$n_failures)
39+
echo "PYTEST_COLOR=$color"
40+
echo "PYTEST_COLOR=$color" >> $GITHUB_ENV
41+
echo "PYTEST_SCORE=$score"
42+
echo "PYTEST_SCORE=$score" >> $GITHUB_ENV
43+
- name: Create Coverage Badge
44+
uses: schneegans/dynamic-badges-action@v1.1.0
45+
with:
46+
auth: ${{ secrets.GIST_SECRET }}
47+
gistID: 098e9c7c53be88779ee52ef2f2bc8803
48+
filename: cliconfig_tests.json
49+
label: Coverage
50+
message: ${{ env.PYTEST_SCORE }}
51+
color: ${{ env.PYTEST_COLOR }}
52+
style: flat
53+
namedLogo: codecov
54+
logoColor: "#959DA5"
55+
labelColor: "#343B42"

0 commit comments

Comments
 (0)