Skip to content

Commit

Permalink
Update GitHub Actions workflows to use latest versions and add cachin…
Browse files Browse the repository at this point in the history
…g for dependencies
  • Loading branch information
chicco-carone committed Nov 4, 2024
1 parent 991d769 commit 4032c12
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.10
cache: 'pip'

- name: Install dependencies
run: |
Expand Down Expand Up @@ -46,7 +47,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Download build artifacts
uses: actions/download-artifact@v2
Expand All @@ -73,4 +74,4 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/snapcast-gui
asset_name: snapcast-gui-${{ matrix.os }}
asset_content_type: application/octet-stream
asset_content_type: application/octet-stream
14 changes: 3 additions & 11 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,15 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ matrix.python-version }}
restore-keys: |
${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ matrix.python-version }}
${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
${{ runner.os }}-pip-
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest
run: |
pytest
pytest

0 comments on commit 4032c12

Please sign in to comment.