-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (56 loc) · 1.73 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Python tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false
installer-parallel: true
version: 1.2.2
- name: Install dependencies
run: |
poetry install --no-dev
sh install_local_dependency.sh
# Before running the test you have to download the tags!
- name: Run tests
run: |
python get_data/get_fpbase_data.py allele_components/tags_fpbase.toml
cd genestorian_module/test
python -m unittest
# Update docker image when committing to master branch if tests pass
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/master'
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v2
with:
images: genestorian_data_refinement
- name: Build and push Docker images
uses: docker/build-push-action@v3.1.1
with:
context: .
push: true
tags: manulera/genestorian_data_refinement:latest
labels: ${{ steps.meta.outputs.labels }}