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

Commit 0f8a94f

Browse files
authored
Merge pull request #160 from CSCfi/dependabot
Create dependabot.yml
2 parents d894eec + 8b3eb42 commit 0f8a94f

File tree

7 files changed

+109
-34
lines changed

7 files changed

+109
-34
lines changed

.github/dependabot.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
labels:
9+
- "pip dependencies"
10+
open-pull-requests-limit: 10
11+
- package-ecosystem: "github-actions"
12+
directory: "/"
13+
schedule:
14+
interval: "weekly"
15+
day: "monday"
16+
labels:
17+
- "github actions"
18+
open-pull-requests-limit: 10
19+
- package-ecosystem: docker
20+
directory: "/"
21+
schedule:
22+
interval: "weekly"
23+
day: "monday"
24+
labels:
25+
- "docker dependencies"
26+
open-pull-requests-limit: 0

.github/workflows/int.yml

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Integration Tests
22

3-
on: [pull_request]
3+
on:
4+
pull_request:
45

56
jobs:
67
build:
@@ -13,38 +14,52 @@ jobs:
1314
runs-on: ${{ matrix.os }}
1415

1516
name: Integration Tests
17+
18+
services:
19+
registry:
20+
image: registry:2
21+
ports:
22+
- 5000:5000
1623

1724
steps:
1825
- uses: actions/checkout@v2
1926
- name: Set up Python ${{ matrix.python-version }}
2027
uses: actions/setup-python@v2
2128
with:
2229
python-version: ${{ matrix.python-version }}
30+
2331
- name: Install requirements
2432
run: |
25-
wget https://github.com/openshift/source-to-image/releases/download/v1.2.0/source-to-image-v1.2.0-2a579ecd-linux-amd64.tar.gz
26-
tar -xvf source-to-image-v1.2.0-2a579ecd-linux-amd64.tar.gz
27-
sudo cp s2i /usr/local/bin
2833
pip install aiohttp
2934
pip install requests
30-
- name: Build image
31-
run: |
32-
s2i build . centos/python-36-centos7 cscfi/beacon-python
35+
36+
- name: Set up Docker Buildx
37+
uses: docker/setup-buildx-action@v1
38+
with:
39+
driver-opts: network=host
40+
41+
- name: Build
42+
uses: docker/build-push-action@v2
43+
with:
44+
context: .
45+
push: true
46+
file: ./Dockerfile
47+
tags: localhost:5000/beacon-python:latest
48+
cache-from: localhost:5000/beacon-python:latest
49+
cache-to: type=local,dest=/tmp/.buildx-cache
3350

3451
- name: Start Services
3552
run: |
36-
pushd deploy/test
37-
docker-compose up -d
53+
docker-compose -f deploy/test/docker-compose.yml up -d
3854
sleep 10
39-
docker exec test_beacon_1 beacon_init data/ALL.chrMT.phase3_callmom-v0_4.20130502.genotypes.vcf.gz data/example_metadata.json
40-
docker exec test_beacon_1 beacon_init data/ALL.chrMT.phase3_callmom-v0_4.20130502.genotypes.vcf.gz /exdata/example_metadata_registered.json
41-
docker exec test_beacon_1 beacon_init data/ALL.chrMT.phase3_callmom-v0_4.20130502.genotypes.vcf.gz /exdata/example_metadata_controlled.json
42-
docker exec test_beacon_1 beacon_init data/ALL.chrMT.phase3_callmom-v0_4.20130502.genotypes.vcf.gz /exdata/example_metadata_controlled1.json
55+
docker exec test_beacon_1 beacon_init /exdata/ALL.chrMT.phase3_callmom-v0_4.20130502.genotypes.vcf.gz /exdata/example_metadata.json
56+
docker exec test_beacon_1 beacon_init /exdata/ALL.chrMT.phase3_callmom-v0_4.20130502.genotypes.vcf.gz /exdata/example_metadata_registered.json
57+
docker exec test_beacon_1 beacon_init /exdata/ALL.chrMT.phase3_callmom-v0_4.20130502.genotypes.vcf.gz /exdata/example_metadata_controlled.json
58+
docker exec test_beacon_1 beacon_init /exdata/ALL.chrMT.phase3_callmom-v0_4.20130502.genotypes.vcf.gz /exdata/example_metadata_controlled1.json
4359
4460
- name: Run Integration test
4561
run: |
46-
pushd deploy/test
47-
python run_tests.py
62+
python deploy/test/run_tests.py
4863
4964
- name: Collect logs from docker
5065
if: ${{ failure() }}

.github/workflows/s2i-build.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: check s2i build
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
max-parallel: 4
9+
matrix:
10+
os: [ubuntu-latest]
11+
12+
runs-on: ${{ matrix.os }}
13+
14+
name: Integration Tests
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Install requirements
20+
run: |
21+
wget https://github.com/openshift/source-to-image/releases/download/v1.2.0/source-to-image-v1.2.0-2a579ecd-linux-amd64.tar.gz
22+
tar -xvf source-to-image-v1.2.0-2a579ecd-linux-amd64.tar.gz
23+
sudo cp s2i /usr/local/bin
24+
- name: Build image
25+
run: |
26+
s2i build . centos/python-36-centos7 cscfi/beacon-python

.github/workflows/unit.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Python Unit Tests
22

3-
on: [push]
3+
on:
4+
push:
5+
schedule:
6+
- cron: '0 7 * * 1'
47

58
jobs:
69
unit_test:
@@ -27,4 +30,4 @@ jobs:
2730
- name: Run unit tests
2831
env:
2932
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
30-
run: tox -e unit_tests
33+
run: tox -e unit_tests

Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
FROM python:3.7-alpine3.9 as BUILD
1+
FROM python:3.7-alpine3.13 as BUILD
22

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

89
COPY requirements.txt /root/beacon/requirements.txt
910
COPY setup.py /root/beacon/setup.py
1011
COPY beacon_api /root/beacon/beacon_api
1112

13+
ENV CYTHONIZE=1
14+
1215
RUN pip install --upgrade pip && \
1316
pip install -r /root/beacon/requirements.txt && \
1417
pip install /root/beacon
1518

16-
FROM python:3.7-alpine3.9
19+
FROM python:3.7-alpine3.13
1720

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

deploy/test/docker-compose.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ services:
1515
- ./mate.sql:/docker-entrypoint-initdb.d/mate.sql:ro
1616
beacon:
1717
hostname: beacon
18-
image: cscfi/beacon-python
18+
image: localhost:5000/beacon-python
1919
volumes:
2020
- ./auth_test.ini:/auth_test.ini
21+
- ../../data/ALL.chrMT.phase3_callmom-v0_4.20130502.genotypes.vcf.gz:/exdata/ALL.chrMT.phase3_callmom-v0_4.20130502.genotypes.vcf.gz
22+
- ../../data/example_metadata.json:/exdata/example_metadata.json
2123
- ./example_metadata_controlled.json:/exdata/example_metadata_controlled.json
2224
- ./example_metadata_controlled1.json:/exdata/example_metadata_controlled1.json
2325
- ./example_metadata_registered.json:/exdata/example_metadata_registered.json
@@ -35,7 +37,7 @@ services:
3537
restart: on-failure
3638
mockauth:
3739
hostname: mockauth
38-
image: cscfi/beacon-python
40+
image: localhost:5000/beacon-python
3941
ports:
4042
- 8000:8000
4143
volumes:

requirements.txt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
aiohttp
2-
aiohttp_cors
3-
asyncpg
4-
jsonschema
5-
Cython
6-
numpy
1+
aiohttp==3.7.4
2+
aiohttp-cors==0.7.0
3+
asyncpg==0.22.0
4+
jsonschema==3.2.0
5+
Cython==0.29.22
76
cyvcf2==0.10.1; python_version < '3.7'
87
cyvcf2; python_version >= '3.7'
9-
tox
10-
uvloop
11-
aiocache
12-
ujson
13-
aiomcache
14-
authlib
15-
gunicorn>=20.0.1
8+
tox==3.23.0
9+
uvloop==0.14.0; python_version < '3.7'
10+
uvloop==0.15.2; python_version >= '3.7'
11+
aiocache==0.11.1
12+
ujson==4.0.2
13+
aiomcache==0.6.0
14+
Authlib==0.15.3
15+
gunicorn==20.0.4

0 commit comments

Comments
 (0)