cleanup and prepare v0.15.0 release (#1933) #997
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: push | |
jobs: | |
build: | |
name: build | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python-version: | |
- '3.8' | |
- '3.9' | |
- '3.10' | |
services: | |
postgres: | |
image: postgres:11 | |
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: | |
# TODO: Update image to 4.3 once its made default | |
image: ghcr.io/bihealth/irods-docker:4.2.11-1 | |
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.40.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 | |
- 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.8' }} | |
- name: Check Python linting | |
run: flake8 . | |
- name: Check Python formatting | |
run: make black arg=--check | |
- 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.8' }} |