Skip to content

lineleght

lineleght #124

---
name: Pull Request Actions
on: [push]
jobs:
black-lint:
runs-on: ubuntu-latest
name: Black
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: psf/black@stable
with:
options: ". --check --line-length 100"
docker-image-push:
runs-on: ubuntu-latest
name: Create staging docker image
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/arnold-stage:${{steps.get_branch_name.outputs.branch}}, clinicalgenomics/arnold-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.9
- name: Check out arnold
uses: actions/checkout@v2
with:
repository: "Clinical-Genomics/arnold"
- name: Install arnold 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=arnold/
coveralls
env:
GITHUB: 1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}