Skip to content

Commit

Permalink
fix: removing cache ussage from actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jagalindo committed Feb 13, 2025
1 parent cf6cc4a commit 4c4d919
Showing 1 changed file with 17 additions and 39 deletions.
56 changes: 17 additions & 39 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,21 @@ name: Python analysis
on: [push, pull_request]

jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools
pip install .
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-


ruff:
needs: setup # Wait for setup to complete
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Restore dependencies from cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
- name: Installing depencencies
run: |
python -m pip install --upgrade pip
pip install setuptools
pip install .
- name: Installing Ruff linter
run: |
pip install ruff
Expand All @@ -46,19 +26,18 @@ jobs:
ruff check .
mypy:
needs: setup # Wait for setup to complete
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Restore dependencies from cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
- name: Installing depencencies
run: |
python -m pip install --upgrade pip
pip install setuptools
pip install .
- name: Installing mypy
run: |
pip install mypy
Expand All @@ -67,22 +46,21 @@ jobs:
mypy -p flamapy
pytest:
needs: setup # Wait for setup to complete
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Restore dependencies from cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
- name: Installing depencencies
run: |
python -m pip install --upgrade pip
pip install setuptools
pip install .
- name: Installing pytest
run: |
pip freeze
pip list
pip install pytest
- name: Running tests
run: |
Expand Down

0 comments on commit 4c4d919

Please sign in to comment.