Skip to content

Commit

Permalink
Merge pull request #8 from RytoEX/update-github-actions
Browse files Browse the repository at this point in the history
Update first-party GitHub Actions
  • Loading branch information
marian-code committed Mar 27, 2024
2 parents 50e6253 + c45c0d6 commit 2bd9006
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/all-lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- uses: marian-code/python-lint-annotate@master
with:
python-root-list: "./tests/*.py ./tests/subtest/*.py"
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ Basic:

```yml
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- uses: marian-code/python-lint-annotate@v3
```

Options:

```yml
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- uses: marian-code/python-lint-annotate@v3
with:
python-root-list: "src/ tests/*" # accepts wildcards
Expand All @@ -54,7 +54,7 @@ steps:

## Details

Uses `actions/setup-python@v2`. Only python `3.7` - `3.10` version are tested since
Uses `actions/setup-python@v5`. Only python `3.7` - `3.10` version are tested since
they are by far most common now. Other python `3.x` versions should also work.
Any python `2.x` versions are unsupported! You can lint on Linux, Windows and MacOS.

Expand All @@ -73,9 +73,9 @@ isort==5.10.1

## IMPORTANT - test environment

The python version is set by `actions/setup-python@v2` using composite actions. This
The python version is set by `actions/setup-python@v5` using composite actions. This
means that the the action will change python you might have previously set with
`actions/setup-python@v2`. There are two ways to circumvent this.
`actions/setup-python@v5`. There are two ways to circumvent this.

- Keep the lintnig action separated from others
- Use it at the and of your workflow when the change in python version will not
Expand All @@ -93,8 +93,8 @@ jobs:
name: Lint Python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- run: |
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ runs:
using: "composite"
steps:
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
architecture: x64
Expand Down
4 changes: 2 additions & 2 deletions examples/actions-only_changed_files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
name: Lint
steps:
- name: Check out source repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # This is necessary to get the commits
- name: Set up Python environment
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Get changed python files between base and head
Expand Down

0 comments on commit 2bd9006

Please sign in to comment.