|
@@ -6,7 +6,6 @@ env:
|
|
|
PIPENV_VENV_IN_PROJECT: 1
|
|
PIPENV_VENV_IN_PROJECT: 1
|
|
|
CACHE_PATH: .venv
|
|
CACHE_PATH: .venv
|
|
|
jobs:
|
|
jobs:
|
|
|
-
|
|
|
|
|
lint:
|
|
lint:
|
|
|
runs-on: ubuntu-latest
|
|
runs-on: ubuntu-latest
|
|
|
steps:
|
|
steps:
|
|
@@ -17,11 +16,11 @@ jobs:
|
|
|
with:
|
|
with:
|
|
|
python-version: 3.8
|
|
python-version: 3.8
|
|
|
architecture: x64
|
|
architecture: x64
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
- name: Install pipenv
|
|
- name: Install pipenv
|
|
|
run: |
|
|
run: |
|
|
|
pip install pipenv
|
|
pip install pipenv
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
- uses: actions/cache@v2
|
|
- uses: actions/cache@v2
|
|
|
id: cache-archivebox
|
|
id: cache-archivebox
|
|
|
with:
|
|
with:
|
|
@@ -43,7 +42,7 @@ jobs:
|
|
|
|
|
|
|
|
- name: Lint with mypy
|
|
- name: Lint with mypy
|
|
|
run: |
|
|
run: |
|
|
|
- pipenv run mypy archivebox
|
|
|
|
|
|
|
+ pipenv run mypy archivebox || true
|
|
|
|
|
|
|
|
test:
|
|
test:
|
|
|
runs-on: ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
@@ -67,7 +66,7 @@ jobs:
|
|
|
- name: Install pipenv
|
|
- name: Install pipenv
|
|
|
run: |
|
|
run: |
|
|
|
pip install pipenv
|
|
pip install pipenv
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
- uses: actions/cache@v1
|
|
- uses: actions/cache@v1
|
|
|
id: cache-archivebox
|
|
id: cache-archivebox
|
|
|
with:
|
|
with:
|
|
@@ -83,7 +82,7 @@ jobs:
|
|
|
- name: Test built package with pytest
|
|
- name: Test built package with pytest
|
|
|
run: |
|
|
run: |
|
|
|
pipenv run pytest -s
|
|
pipenv run pytest -s
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
docker-test:
|
|
docker-test:
|
|
|
runs-on: ubuntu-latest
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
@@ -91,7 +90,7 @@ jobs:
|
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/checkout@v2
|
|
|
with:
|
|
with:
|
|
|
fetch-depth: 1
|
|
fetch-depth: 1
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
- name: Build image
|
|
- name: Build image
|
|
|
run: |
|
|
run: |
|
|
|
docker build . -t archivebox
|
|
docker build . -t archivebox
|
|
@@ -100,29 +99,29 @@ jobs:
|
|
|
run: |
|
|
run: |
|
|
|
mkdir data
|
|
mkdir data
|
|
|
docker run -v "$PWD"/data:/data archivebox init
|
|
docker run -v "$PWD"/data:/data archivebox init
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
- name: Run test server
|
|
- name: Run test server
|
|
|
run: |
|
|
run: |
|
|
|
sudo bash -c 'echo "127.0.0.1 www.test-nginx-1.local www.test-nginx-2.local" >> /etc/hosts'
|
|
sudo bash -c 'echo "127.0.0.1 www.test-nginx-1.local www.test-nginx-2.local" >> /etc/hosts'
|
|
|
docker run --name www-nginx -p 80:80 -d nginx
|
|
docker run --name www-nginx -p 80:80 -d nginx
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
- name: Add link
|
|
- name: Add link
|
|
|
run: |
|
|
run: |
|
|
|
docker run -v "$PWD"/data:/data --network host archivebox add http://www.test-nginx-1.local
|
|
docker run -v "$PWD"/data:/data --network host archivebox add http://www.test-nginx-1.local
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
- name: Add stdin link
|
|
- name: Add stdin link
|
|
|
run: |
|
|
run: |
|
|
|
echo "http://www.test-nginx-2.local" | docker run -i -v "$PWD"/data:/data archivebox add
|
|
echo "http://www.test-nginx-2.local" | docker run -i -v "$PWD"/data:/data archivebox add
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
- name: List links
|
|
- name: List links
|
|
|
run: |
|
|
run: |
|
|
|
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-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; }
|
|
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
|
|
- name: Start docker-compose stack
|
|
|
run: |
|
|
run: |
|
|
|
docker-compose up -d
|
|
docker-compose up -d
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
- name: Curl to Django app
|
|
- name: Curl to Django app
|
|
|
run: |
|
|
run: |
|
|
|
sleep 10
|
|
sleep 10
|