feat(actions): Update versions #220
Workflow file for this run
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: Pull Request Actions | |
on: [push] | |
jobs: | |
black-lint: | |
runs-on: ubuntu-latest | |
name: Black | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
- uses: psf/black@stable | |
with: | |
black_args: ". --check --line-length 100" | |
docker-image-push: | |
runs-on: ubuntu-latest | |
name: Create staging docker image | |
steps: | |
- name: Check out git repository | |
uses: actions/[email protected] | |
- 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/[email protected] | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/[email protected] | |
- name: Build and push | |
id: docker_build | |
uses: docker/[email protected] | |
with: | |
context: ./ | |
file: ./Dockerfile | |
push: true | |
tags: "clinicalgenomics/genotype-api-stage:${{steps.get_branch_name.outputs.branch}}, clinicalgenomics/genotype-api-stage:latest" | |
tests-coverage: | |
runs-on: ubuntu-latest | |
name: Test and coveralls | |
steps: | |
- name: Set up Python | |
uses: actions/[email protected] | |
with: | |
python-version: "3.10" | |
- name: Check out genotype-api | |
uses: actions/[email protected] | |
with: | |
repository: "Clinical-Genomics/genotype-api" | |
- name: Install genotype-api 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=genotype_api/ | |
coveralls | |
env: | |
GITHUB: 1 | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} |