mirror of
https://github.com/wallabag/docker
synced 2025-12-15 18:56:29 +00:00
Ditch Travis to use GitHub Actions
Jump to GitHub Actions mostly because I found them most reliable these days (weeks?) than Travis. And also because the open source builds are very limited now.
This commit is contained in:
54
.github/workflows/test.yml
vendored
Normal file
54
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
name: "CI"
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- "master"
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "master"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: "Testing with database: ${{ matrix.database }}"
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
database:
|
||||||
|
- "default"
|
||||||
|
- "sqlite"
|
||||||
|
- "mariadb"
|
||||||
|
- "postgresql"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: "Checkout"
|
||||||
|
uses: "actions/checkout@v2"
|
||||||
|
with:
|
||||||
|
fetch-depth: 2
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: 3.5
|
||||||
|
|
||||||
|
- name: "Build image"
|
||||||
|
run: docker-compose -f tests/docker-compose.${{ matrix.database }}.yml build
|
||||||
|
|
||||||
|
- name: "Run image"
|
||||||
|
run: docker-compose -f tests/docker-compose.${{ matrix.database }}.yml up -d
|
||||||
|
|
||||||
|
- name: "Install dependencies"
|
||||||
|
run: |
|
||||||
|
pip install pytest
|
||||||
|
pip install requests
|
||||||
|
|
||||||
|
- name: "Check running instance"
|
||||||
|
run: docker ps
|
||||||
|
|
||||||
|
- name: "Wait 60s"
|
||||||
|
run: sleep 60
|
||||||
|
|
||||||
|
- name: "Run tests"
|
||||||
|
run: py.test tests/
|
||||||
26
.travis.yml
26
.travis.yml
@@ -1,26 +0,0 @@
|
|||||||
language: python
|
|
||||||
|
|
||||||
python:
|
|
||||||
- 3.5
|
|
||||||
|
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
env:
|
|
||||||
- DB_TYPE=default
|
|
||||||
- DB_TYPE=sqlite
|
|
||||||
- DB_TYPE=mariadb
|
|
||||||
- DB_TYPE=postgresql
|
|
||||||
|
|
||||||
install:
|
|
||||||
- docker-compose -f tests/docker-compose.$DB_TYPE.yml build
|
|
||||||
- docker-compose -f tests/docker-compose.$DB_TYPE.yml up -d
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- pip install pytest
|
|
||||||
- pip install requests
|
|
||||||
|
|
||||||
script:
|
|
||||||
- docker ps | grep -q wallabag
|
|
||||||
- sleep 60
|
|
||||||
- py.test tests/
|
|
||||||
Reference in New Issue
Block a user