-
Notifications
You must be signed in to change notification settings - Fork 3
103 lines (103 loc) · 3.24 KB
/
build.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
92
93
94
95
96
97
98
99
100
101
102
103
name: build
on: push
jobs:
build:
name: build
runs-on: ubuntu-20.04
strategy:
matrix:
python-version:
- '3.9'
- '3.10'
- '3.11'
services:
postgres:
image: postgres:16
env:
POSTGRES_DB: sodar
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 10s
--health-timeout 5s
--health-retries 10
ports:
- 5432:5432
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
irods:
image: ghcr.io/bihealth/irods-docker:4.3.3-wip
env:
IRODS_AUTHENTICATION_SCHEME: native
IRODS_DEFAULT_HASH_SCHEME: MD5
IRODS_ICAT_DBSERVER: postgres
IRODS_ICAT_DBUSER: postgres
IRODS_ICAT_DBPASS: postgres
IRODS_ZONE_NAME: sodarZone
NO_WAIT: 1
ports:
- 4488:1247
env:
POSTGRES_HOST: 127.0.0.1
POSTGRES_PORT: 5432
DATABASE_URL: 'postgres://postgres:[email protected]/sodar'
steps:
- name: Install server dependencies
run: |
sudo apt update
sudo apt install -qq build-essential zlib1g-dev libtiff5-dev libjpeg8-dev libfreetype6-dev
sudo apt install -qq liblcms2-dev libwebp-dev libpq-dev graphviz-dev
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Checkout repository
uses: actions/checkout@v3
- name: Install project Python dependencies
run: |
pip install wheel==0.42.0
pip install -r requirements/local.txt
pip install -r requirements/test.txt
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Build and run Vue app
run: |
npm ci --prefix samplesheets/vueapp
nohup npm run -prefix samplesheets/vueapp serve &
- name: Download icons
run: python manage.py geticons
- name: Run collectstatic
run: python manage.py collectstatic --noinput
# NOTE: Workaround for python-irodsclient>1.1.9 redirect issue
- name: Add irods to /etc/hosts
run: |
sudo echo "127.0.0.1 irods" | sudo tee -a /etc/hosts
- name: Run Django tests
run: |
coverage run --rcfile=.coveragerc manage.py test -v 2 --settings=config.settings.test
coverage lcov
coverage report
- name: Run Vue app tests
run: make test_samplesheets_vue
if: ${{ matrix.python-version == '3.11' }}
- name: Check Python linting
run: flake8 .
- name: Check Python formatting
run: make black arg=--check
if: ${{ matrix.python-version == '3.11' }}
- name: Report coverage with Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: './coverage.lcov'
if: ${{ matrix.python-version == '3.11' }}