update #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | ||
on: | ||
pull_request: | ||
push: | ||
workflow_dispatch: | ||
jobs: | ||
update_database: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
- name: Load cached Poetry installation | ||
id: cached-poetry` | ||
Check failure on line 19 in .github/workflows/ci.yml GitHub Actions / TestsInvalid workflow file
|
||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.local | ||
key: poetry-0 | ||
- name: Install Poetry | ||
if: steps.cached-poetry.outputs.cache-hit != 'true' | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
- name: Cache Database files | ||
id: cache-db | ||
uses: actions/cache@v2 | ||
with: | ||
path: data | ||
key: ${{ runner.os }}-data | ||
- name: Run update script if cache miss | ||
if: steps.cache-db.outputs.cache-hit != 'true' | ||
run: | | ||
poetry install | ||
chmod +x ./update.py | ||
poetry run ./update.py | ||
- name: Clean up unnecessary files | ||
if: always() | ||
run: | | ||
rm -rf data/*.csv data/*.db | ||