tests: enable github cache

This commit is contained in:
Bryce 2022-10-10 21:46:50 -07:00 committed by Bryce Drennan
parent db5ebe9095
commit 4e72cc2706

View File

@ -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: |