Skip to content

Commit

Permalink
Upgrade GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Oct 4, 2023
1 parent 179bec3 commit fec460b
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
packages: write

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Docker meta
id: meta
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit-autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:
pre-commit-autoupdate:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: dev
# https://github.com/peter-evans/create-pull-request/issues/48
token: ${{ secrets.GH_PAT }}
- uses: actions/setup-python@v4
with:
# https://github.com/actions/python-versions/releases
python-version: '3.11'
python-version: '3.12'
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login != github.event.pull_request.base.repo.owner.login
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
# https://github.com/actions/python-versions/releases
python-version: '3.11'
python-version: '3.12'
- run: |
pip install pre-commit
pre-commit --version
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/python_safety.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: python_safety

on: [pull_request, push]

jobs:
python_safety:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login != github.event.pull_request.base.repo.owner.login
runs-on: 'ubuntu-22.04'
steps:
- run: sudo apt-get -q update
- run: sudo DEBIAN_FRONTEND="noninteractive" apt-get -qq --no-install-recommends dist-upgrade
- run: sudo DEBIAN_FRONTEND="noninteractive" apt-get -qq --no-install-recommends install
curl gcc ffmpeg libcurl4-openssl-dev libssl-dev motion v4l-utils
- uses: actions/checkout@v4
- run: pip install --user safety .
- run: safety check
2 changes: 1 addition & 1 deletion .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login != github.event.pull_request.base.repo.owner.login
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Download shellcheck
run: |
curl -sSfL "$(curl -sSf 'https://api.github.com/repos/koalaman/shellcheck/releases/latest' | mawk -F\" '/"browser_download_url.*\.linux\.x86_64\.tar\.xz"/{print $4;exit}')" -o shellcheck.tar.xz
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/test_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:
runs-on: ${{ matrix.dist }}
name: "Test on ${{ matrix.dist }}"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- run: test '${{ matrix.dist }}' != 'ubuntu-22.04' || sudo apt-mark hold grub-efi-amd64-signed # Workaround for failing package upgrade on Jammy
- run: sudo apt-get -q update
- run: sudo DEBIAN_FRONTEND="noninteractive" apt-get -qq --no-install-recommends dist-upgrade
- run: sudo DEBIAN_FRONTEND="noninteractive" apt-get -qq --no-install-recommends install
curl gcc ffmpeg libcurl4-openssl-dev libssl-dev motion v4l-utils
- run: python3 -m pip install --upgrade pip setuptools wheel
- run: python3 -m pip install --upgrade build mypy pytest safety
- run: python3 -m pip install --upgrade build mypy pytest
- run: python3 -m build
- run: python3 -m pip install .
- run: mkdir --parents --verbose .mypy_cache
Expand All @@ -33,4 +33,3 @@ jobs:
- run: pytest --fixtures tests/test_utils/test_mjpeg.py || true
- run: pytest --fixtures tests/test_utils/test_rtmp.py || true
- run: pytest . || pytest --doctest-modules . || true
- run: safety check
5 changes: 3 additions & 2 deletions .github/workflows/update_locales.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ jobs:

- name: Install dependencies
run: |
python3 -m pip install -U babel jinja2 &
python3 -m pip install --upgrade pip setuptools
python3 -m pip install --upgrade babel jinja2
sudo apt-get -q update
sudo DEBIAN_FRONTEND='noninteractive' apt-get -qq --no-install-recommends install gettext
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
# https://github.com/peter-evans/create-pull-request/issues/48
Expand Down
2 changes: 1 addition & 1 deletion motioneye/locale/motioneye.js.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-28 17:58+0000\n"
"POT-Creation-Date: 2023-10-04 09:14+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
4 changes: 2 additions & 2 deletions motioneye/locale/motioneye.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2023-09-28 17:58+0000\n"
"POT-Creation-Date: 2023-10-04 09:14+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.12.1\n"
"Generated-By: Babel 2.13.0\n"

#: motioneye/server.py:232
msgid "interrompa signalo ricevita, fermanta …"
Expand Down
2 changes: 1 addition & 1 deletion motioneye/utils/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def _get_dict_field_val(cls, k: Union[str, Hashable], v: Any) -> Any:
return v

@classmethod
def from_dict(cls, d: dict) -> __qualname__:
def from_dict(cls, d: dict): # -> typing.Self in Python >= v3.11
return cls(
**{
k: cls._get_dict_field_val(k, v)
Expand Down

0 comments on commit fec460b

Please sign in to comment.