Fixed docker test
This commit is contained in:
parent
533ae7413c
commit
bf09c6b40a
2 changed files with 8 additions and 7 deletions
13
.github/workflows/test.yml
vendored
13
.github/workflows/test.yml
vendored
|
@ -3,6 +3,7 @@ on: [push]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
MAX_LINE_LENGTH: 110
|
MAX_LINE_LENGTH: 110
|
||||||
|
DOCKER_IMAGE: archivebox-ci
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
|
@ -118,12 +119,12 @@ jobs:
|
||||||
|
|
||||||
- name: Build image
|
- name: Build image
|
||||||
run: |
|
run: |
|
||||||
docker build . -t archivebox
|
docker build . -t "$DOCKER_IMAGE"
|
||||||
|
|
||||||
- name: Init data dir
|
- name: Init data dir
|
||||||
run: |
|
run: |
|
||||||
mkdir data
|
mkdir data
|
||||||
docker run -v "$PWD"/data:/data archivebox init
|
docker run -v "$PWD"/data:/data "$DOCKER_IMAGE" init
|
||||||
|
|
||||||
- name: Run test server
|
- name: Run test server
|
||||||
run: |
|
run: |
|
||||||
|
@ -132,16 +133,16 @@ jobs:
|
||||||
|
|
||||||
- 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 "$DOCKER_IMAGE" 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 "$DOCKER_IMAGE" 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 "$DOCKER_IMAGE" 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 "$DOCKER_IMAGE" 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: |
|
||||||
|
|
|
@ -12,7 +12,7 @@ version: '3.7'
|
||||||
services:
|
services:
|
||||||
archivebox:
|
archivebox:
|
||||||
# build: .
|
# build: .
|
||||||
image: nikisweeting/archivebox:latest
|
image: ${DOCKER_IMAGE:-nikisweeting/archivebox:latest}
|
||||||
command: server 0.0.0.0:8000
|
command: server 0.0.0.0:8000
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
tty: true
|
tty: true
|
||||||
|
|
Loading…
Reference in a new issue