Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.
Merged
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
41 changes: 41 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Documentation Checks

on: [push]

jobs:
spell_check:
strategy:
max-parallel: 4
matrix:
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}

steps:
- name: Spell check install
run: curl -L https://git.io/misspell | bash
- name: Spell check docs
run: bin/misspell -error docs/*

code_docs:
strategy:
max-parallel: 4
matrix:
os: [ubuntu-latest]
python-version: [3.7]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Run docs tests
run: tox -e docs

58 changes: 58 additions & 0 deletions .github/workflows/int.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Integration Tests

on: [pull_request]

jobs:
build:
strategy:
max-parallel: 4
matrix:
os: [ubuntu-latest]
python-version: [3.7]

runs-on: ${{ matrix.os }}

name: Integration Tests

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: |
wget https://github.com/openshift/source-to-image/releases/download/v1.2.0/source-to-image-v1.2.0-2a579ecd-linux-amd64.tar.gz
tar -xvf source-to-image-v1.2.0-2a579ecd-linux-amd64.tar.gz
sudo cp s2i /usr/local/bin
pip install aiohttp
pip install requests
- name: Build image
run: |
s2i build . centos/python-36-centos7 cscfi/beacon-python

- name: Start Services
run: |
pushd deploy/test
docker-compose up -d
sleep 10
docker exec test_beacon_1 beacon_init data/ALL.chrMT.phase3_callmom-v0_4.20130502.genotypes.vcf.gz data/example_metadata.json
docker exec test_beacon_1 beacon_init data/ALL.chrMT.phase3_callmom-v0_4.20130502.genotypes.vcf.gz /exdata/example_metadata_registered.json
docker exec test_beacon_1 beacon_init data/ALL.chrMT.phase3_callmom-v0_4.20130502.genotypes.vcf.gz /exdata/example_metadata_controlled.json
docker exec test_beacon_1 beacon_init data/ALL.chrMT.phase3_callmom-v0_4.20130502.genotypes.vcf.gz /exdata/example_metadata_controlled1.json

- name: Run Integration test
run: |
pushd deploy/test
python run_tests.py

- name: Collect logs from docker
if: ${{ failure() }}
run: cd deploy && docker-compose logs --no-color -t > ../tests/dockerlogs || true

- name: Persist log files
if: ${{ failure() }}
uses: actions/upload-artifact@v1
with:
name: test_debugging_help
path: tests
49 changes: 49 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish Docker image

on:
release:
types: [published]
push:
branches: [master]

jobs:
push_to_registry:
name: Push Beacon Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Login to DockerHub Registry
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Get the version
id: vars
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10})
- name: Build the tagged Docker image
run: docker build . --file Dockerfile --tag cscfi/beacon-python:${{steps.vars.outputs.tag}}
- name: Push the tagged Docker image
run: docker push cscfi/beacon-python:${{steps.vars.outputs.tag}}
- name: Build the latest Docker image
run: docker build . --file Dockerfile --tag cscfi/beacon-python:latest
- name: Push the latest Docker image
run: docker push cscfi/beacon-python:latest
push_data_to_registry:
name: Push Dataloader Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Login to DockerHub Registry
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Get the version
id: vars
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10})
- name: Build the tagged Docker image
run: |
pushd deploy/test
docker build . --file Dockerfile --tag cscfi/beacon-dataloader:${{steps.vars.outputs.tag}}
- name: Push the tagged Docker image
run: docker push cscfi/beacon-dataloader:${{steps.vars.outputs.tag}}
- name: Build the latest Docker image
run: |
pushd deploy/test
docker build . --file Dockerfile --tag cscfi/beacon-dataloader:latest
- name: Push the latest Docker image
run: docker push cscfi/beacon-dataloader:latest
28 changes: 28 additions & 0 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Python style check

on: [push]

jobs:
style_check:
strategy:
max-parallel: 4
matrix:
os: [ubuntu-latest]
python-version: [3.6, 3.7]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test flake8 syntax with tox
run: tox -e flake8
- name: Do bandit static check with tox
run: tox -e bandit
30 changes: 30 additions & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Python Unit Tests

on: [push]

jobs:
unit_test:
strategy:
max-parallel: 4
matrix:
os: [ubuntu-latest]
python-version: [3.6, 3.7]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install libcurl-devel
run: sudo apt-get install libcurl4-openssl-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Run unit tests
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: tox -e unit_tests
103 changes: 0 additions & 103 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## beacon-python - Python-based Beacon API Web Server

[![Build Status](https://travis-ci.org/CSCfi/beacon-python.svg?branch=master)](https://travis-ci.org/CSCfi/beacon-python)
[![Coverage Status](https://coveralls.io/repos/github/CSCfi/beacon-python/badge.svg?branch=master)](https://coveralls.io/github/CSCfi/beacon-python?branch=master)
![Integration Tests](https://github.com/CSCfi/beacon-python/workflows/Integration%20Tests/badge.svg)
![Python Unit Tests](https://github.com/CSCfi/beacon-python/workflows/Python%20Unit%20Tests/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/CSCfi/beacon-python/badge.svg?branch=HEAD)](https://coveralls.io/github/CSCfi/beacon-python?branch=HEAD)
[![Documentation Status](https://readthedocs.org/projects/beacon-python/badge/?version=latest)](https://beacon-python.readthedocs.io/en/latest/?badge=latest)
[![Docker Image](https://images.microbadger.com/badges/image/cscfi/beacon-python.svg)](https://microbadger.com/images/cscfi/beacon-python)

Documentation: https://beacon-python.readthedocs.io

Expand Down
Loading