Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Create dependabot.yml #160

Merged
merged 4 commits into from
Mar 17, 2021
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
26 changes: 26 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
labels:
- "pip dependencies"
open-pull-requests-limit: 10
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
labels:
- "github actions"
open-pull-requests-limit: 10
- package-ecosystem: docker
directory: "/"
schedule:
interval: "weekly"
day: "monday"
labels:
- "docker dependencies"
open-pull-requests-limit: 0
45 changes: 30 additions & 15 deletions .github/workflows/int.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Integration Tests

on: [pull_request]
on:
pull_request:

jobs:
build:
Expand All @@ -13,38 +14,52 @@ jobs:
runs-on: ${{ matrix.os }}

name: Integration Tests

services:
registry:
image: registry:2
ports:
- 5000:5000

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
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: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
driver-opts: network=host

- name: Build
uses: docker/build-push-action@v2
with:
context: .
push: true
file: ./Dockerfile
tags: localhost:5000/beacon-python:latest
cache-from: localhost:5000/beacon-python:latest
cache-to: type=local,dest=/tmp/.buildx-cache

- name: Start Services
run: |
pushd deploy/test
docker-compose up -d
docker-compose -f deploy/test/docker-compose.yml 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
docker exec test_beacon_1 beacon_init /exdata/ALL.chrMT.phase3_callmom-v0_4.20130502.genotypes.vcf.gz /exdata/example_metadata.json
docker exec test_beacon_1 beacon_init /exdata/ALL.chrMT.phase3_callmom-v0_4.20130502.genotypes.vcf.gz /exdata/example_metadata_registered.json
docker exec test_beacon_1 beacon_init /exdata/ALL.chrMT.phase3_callmom-v0_4.20130502.genotypes.vcf.gz /exdata/example_metadata_controlled.json
docker exec test_beacon_1 beacon_init /exdata/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
python deploy/test/run_tests.py

- name: Collect logs from docker
if: ${{ failure() }}
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/s2i-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: check s2i build

on: [pull_request]

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

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

name: Integration Tests

steps:
- uses: actions/checkout@v2

- 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
- name: Build image
run: |
s2i build . centos/python-36-centos7 cscfi/beacon-python
7 changes: 5 additions & 2 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Python Unit Tests

on: [push]
on:
push:
schedule:
- cron: '0 7 * * 1'

jobs:
unit_test:
Expand All @@ -27,4 +30,4 @@ jobs:
- name: Run unit tests
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: tox -e unit_tests
run: tox -e unit_tests
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
FROM python:3.7-alpine3.9 as BUILD
FROM python:3.7-alpine3.13 as BUILD

RUN apk add --update \
&& apk add --no-cache build-base curl-dev linux-headers bash git musl-dev\
&& apk add --no-cache libressl-dev libffi-dev autoconf bzip2-dev xz-dev\
&& apk add --no-cache python3-dev rust cargo \
&& rm -rf /var/cache/apk/*

COPY requirements.txt /root/beacon/requirements.txt
COPY setup.py /root/beacon/setup.py
COPY beacon_api /root/beacon/beacon_api

ENV CYTHONIZE=1

RUN pip install --upgrade pip && \
pip install -r /root/beacon/requirements.txt && \
pip install /root/beacon

FROM python:3.7-alpine3.9
FROM python:3.7-alpine3.13

RUN apk add --no-cache --update bash

Expand Down
6 changes: 4 additions & 2 deletions deploy/test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ services:
- ./mate.sql:/docker-entrypoint-initdb.d/mate.sql:ro
beacon:
hostname: beacon
image: cscfi/beacon-python
image: localhost:5000/beacon-python
volumes:
- ./auth_test.ini:/auth_test.ini
- ../../data/ALL.chrMT.phase3_callmom-v0_4.20130502.genotypes.vcf.gz:/exdata/ALL.chrMT.phase3_callmom-v0_4.20130502.genotypes.vcf.gz
- ../../data/example_metadata.json:/exdata/example_metadata.json
- ./example_metadata_controlled.json:/exdata/example_metadata_controlled.json
- ./example_metadata_controlled1.json:/exdata/example_metadata_controlled1.json
- ./example_metadata_registered.json:/exdata/example_metadata_registered.json
Expand All @@ -35,7 +37,7 @@ services:
restart: on-failure
mockauth:
hostname: mockauth
image: cscfi/beacon-python
image: localhost:5000/beacon-python
ports:
- 8000:8000
volumes:
Expand Down
26 changes: 13 additions & 13 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
aiohttp
aiohttp_cors
asyncpg
jsonschema
Cython
numpy
aiohttp==3.7.4
aiohttp-cors==0.7.0
asyncpg==0.22.0
jsonschema==3.2.0
Cython==0.29.22
cyvcf2==0.10.1; python_version < '3.7'
cyvcf2; python_version >= '3.7'
tox
uvloop
aiocache
ujson
aiomcache
authlib
gunicorn>=20.0.1
tox==3.23.0
uvloop==0.14.0; python_version < '3.7'
uvloop==0.15.2; python_version >= '3.7'
aiocache==0.11.1
ujson==4.0.2
aiomcache==0.6.0
Authlib==0.15.3
gunicorn==20.0.4