mirror of
https://github.com/brycedrennan/imaginAIry
synced 2024-10-31 03:20:40 +00:00
tests: enable github cache
This commit is contained in:
parent
db5ebe9095
commit
4e72cc2706
25
.github/workflows/ci.yaml
vendored
25
.github/workflows/ci.yaml
vendored
@ -9,10 +9,12 @@ jobs:
|
|||||||
lint:
|
lint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: 3.9
|
||||||
|
cache: pip
|
||||||
|
cache-dependency-path: requirements-dev.txt
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --disable-pip-version-check -r requirements-dev.txt
|
python -m pip install --disable-pip-version-check -r requirements-dev.txt
|
||||||
@ -24,8 +26,8 @@ jobs:
|
|||||||
autoformat:
|
autoformat:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: 3.9
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
@ -41,15 +43,26 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.8", "3.10"]
|
python-version: ["3.8", "3.10"]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
cache: pip
|
||||||
|
cache-dependency-path: requirements-dev.txt
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --disable-pip-version-check -r requirements-dev.txt
|
python -m pip install --disable-pip-version-check -r requirements-dev.txt
|
||||||
python -m pip install --disable-pip-version-check .
|
python -m pip install --disable-pip-version-check .
|
||||||
|
- name: Get current date
|
||||||
|
id: date
|
||||||
|
run: echo "::set-output name=curmonth::$(date +'%Y-%m')"
|
||||||
|
- name: Cache Model Files
|
||||||
|
id: cache-model-files
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ~/.cache
|
||||||
|
key: ${{ steps.date.outputs.curmonth }}
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
run: |
|
run: |
|
||||||
|
Loading…
Reference in New Issue
Block a user