mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-14 07:04:27 -04:00
Merge pull request #411 from cdvv7788/gh-actions-issue
fix: Use pip cache instead of venv folder
This commit is contained in:
commit
08422da569
1 changed files with 3 additions and 18 deletions
21
.github/workflows/test.yml
vendored
21
.github/workflows/test.yml
vendored
|
@ -27,11 +27,6 @@ jobs:
|
|||
# one pass for small stylistic things
|
||||
flake8 archivebox --count --max-line-length="$MAX_LINE_LENGTH" --statistics
|
||||
|
||||
# - name: Lint with mypy
|
||||
# run: |
|
||||
# pip install mypy
|
||||
# mypy archivebox || true
|
||||
|
||||
test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
|
@ -51,31 +46,22 @@ jobs:
|
|||
python-version: ${{ matrix.python }}
|
||||
architecture: x64
|
||||
|
||||
- name: Cache virtualenv
|
||||
- name: Cache pip
|
||||
uses: actions/cache@v2
|
||||
id: cache-venv
|
||||
id: cache-pip
|
||||
with:
|
||||
path: .venv
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-${{ matrix.python }}-venv-${{ hashFiles('setup.py') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ matrix.python }}-venv-
|
||||
|
||||
- name: Create virtualenv
|
||||
if: steps.cache-venv.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
python3 -m pip install --upgrade pip setuptools
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
source .venv/bin/activate
|
||||
python -m pip install .
|
||||
python -m pip install pytest bottle
|
||||
|
||||
- name: Test built package with pytest
|
||||
run: |
|
||||
source .venv/bin/activate
|
||||
python -m pytest -s
|
||||
|
||||
docker-test:
|
||||
|
@ -115,7 +101,6 @@ jobs:
|
|||
docker run -v "$PWD"/data:/data archivebox list | grep -q "www.test-nginx-1.local" || { echo "The site 1 isn't in the list"; exit 1; }
|
||||
docker run -v "$PWD"/data:/data archivebox list | grep -q "www.test-nginx-2.local" || { echo "The site 2 isn't in the list"; exit 1; }
|
||||
|
||||
|
||||
- name: Start docker-compose stack
|
||||
run: |
|
||||
docker-compose run archivebox init
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue