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:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.9
|
||||
cache: pip
|
||||
cache-dependency-path: requirements-dev.txt
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --disable-pip-version-check -r requirements-dev.txt
|
||||
@ -24,8 +26,8 @@ jobs:
|
||||
autoformat:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: Install dependencies
|
||||
@ -41,15 +43,26 @@ jobs:
|
||||
matrix:
|
||||
python-version: ["3.8", "3.10"]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: pip
|
||||
cache-dependency-path: requirements-dev.txt
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --disable-pip-version-check -r requirements-dev.txt
|
||||
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
|
||||
timeout-minutes: 10
|
||||
run: |
|
||||
|
Loading…
Reference in New Issue
Block a user