Skip to content

Commit

Permalink
Merge pull request #1342 from moj-analytical-services/update_actions
Browse files Browse the repository at this point in the history
Update actions
  • Loading branch information
zslade authored Jun 20, 2023
2 parents d06b27a + 243fdad commit fddf7f4
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/autoblack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -31,7 +31,7 @@ jobs:
uses: actions/cache@v2
with:
path: .venv
key: venv-lint-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-00
key: venv-lint-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-01
- name: Install linting dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root --only linting
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up python
id: setup-python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9.10

Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
runs-on: ubuntu-latest
needs: generate-files
steps:
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: 3.9

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
python-version: [3.8]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/poetry_pypi_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
token: ${{ secrets.SPLINK_TOKEN }}
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Publish to Pypi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pytest_benchmark_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up python
id: setup-python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9.10

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pytest_benchmark_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: master
token: ${{ secrets.SPLINK_TOKEN }}
- name: Set up python
id: setup-python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.9.10

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pytest_postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ jobs:
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up python
id: setup-python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
#----------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pytest_run_tests_with_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up python
id: setup-python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
#----------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_demos_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: 3.9

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_demos_tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: 3.9

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/symlink_comparisons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
ref: master
token: ${{ secrets.SPLINK_TOKEN }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Load cached Poetry installation
Expand Down
14 changes: 7 additions & 7 deletions scripts/lint.sh → scripts/lint_and_format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ echo "$line_block $black_run $line_block"

black .

OPTIND=1

ruff_run="Running the ruff linter"
echo "$line_block $ruff_run $line_block"

OPTIND=1

while getopts ":f" opt; do
case $opt in
f)
ruff --fix splink/ --quiet
ruff --fix tests/ --quiet
echo "--fix was run for your scripts" >&2
ruff --fix splink/ --quiet &&\
ruff --fix tests/ --quiet &&
;;
\?)
echo "Invalid option: -$OPTARG. Only -f (fix) is accepted." >&2
;;
esac
done

ruff --show-source splink/ &&\
ruff --show-source tests/ &&\
ruff --show-source benchmarking/
ruff --show-source splink/
ruff --show-source tests/
ruff --show-source benchmarking/

0 comments on commit fddf7f4

Please sign in to comment.