-
Notifications
You must be signed in to change notification settings - Fork 1
91 lines (78 loc) · 2.59 KB
/
merge_master_ci.yml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: 'Merge-master-CI'
on:
push:
branches:
- 'master'
- 'main'
jobs:
bump-version:
runs-on: ubuntu-latest
name: Bump version and push tags to master
steps:
- name: Bump version
uses: Clinical-Genomics/bump2version-ci@master
env:
BUMPVERSION_TOKEN: ${{ secrets.BUMPVERSION_TOKEN }}
BUMPVERSION_AUTHOR: ${{ secrets.BUMPVERSION_AUTHOR }}
BUMPVERSION_EMAIL: ${{ secrets.BUMPVERSION_EMAIL }}
GITHUB_REPOSITORY: ${{ github.repository }}
docker-image-push:
runs-on: ubuntu-latest
name: Push staging docker image to dockerhub
steps:
- name: Check out git repository
uses: actions/checkout@v2
- name: Extract branch name and remove illegal chars
id: get_branch_name
shell: bash
run: echo "##[set-output name=branch;]$(echo "$(tr "/" "-" <<<${GITHUB_REF#refs/heads/})")"
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
push: true
tags: "clinicalgenomics/cg_lims-stage:${{steps.get_branch_name.outputs.branch}}, clinicalgenomics/cg_lims-stage:latest"
tests-coverage:
runs-on: ubuntu-latest
name: Test and coveralls
steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Check out limsmock
uses: actions/checkout@v2
with:
repository: "Clinical-Genomics/limsmock"
- name: Install limsmock dependencies
run: |
python -m pip install --upgrade pip==21.1.2
pip install -r requirements.txt -r requirements-dev.txt .
- name: Check out cg_lims
uses: actions/checkout@v2
with:
repository: "Clinical-Genomics/cg_lims"
- name: Install cg_lims dependencies
run: |
pip install -r requirements.txt -r requirements-dev.txt .
- name: Install coveralls dependencies
run: |
pip install pytest-cov coveralls
- name: Test with pytest & Coveralls
run: |
pytest --cov=cg_lims/
coveralls
env:
GITHUB: 1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}