Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache it #3

Open
wants to merge 9 commits into
base: speedtest
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 18 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,29 @@ jobs:
with:
python-version: 3.8

# - name: Restore cache
# uses: actions/cache@v2
# with:
# path: ~/.cache/pip
# key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
# restore-keys: |
# ${{ runner.os }}-pip-
- name: Restore cache
uses: actions/cache@v2
with:
path: .venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-venv-

- name: Install dependencies
run: |
sudo apt install python3-dev postgresql libpq-dev build-essential libxml2-dev libxslt1-dev postgresql ncat
python -m pip install --upgrade pip
pip install -r requirements.txt

- uses: syphar/restore-virtualenv@v1
id: cache-virtualenv
with:
requirement_files: requirements.txt # this is optional

- uses: syphar/restore-pip-download-cache@v1
if: steps.cache-virtualenv.outputs.cache-hit != 'true'

- run: pip install -r requirements.txt
if: steps.cache-virtualenv.outputs.cache-hit != 'true'

- name: Setup database
env:
Expand All @@ -42,9 +52,5 @@ jobs:
- name: Run tests
run: python -m pytest -v -m "not webtest"
env:
# The hostname, username used to communicate with Postgresql
POSTGRES_HOST: localhost
VC_DB_USER: vulnerablecode
POSTGRES_PORT: 5432
DJANGO_DEV: 1
GH_TOKEN: 1
2 changes: 1 addition & 1 deletion haha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1625
14662