Skip to content

kickstart rdock-utils package #6

kickstart rdock-utils package

kickstart rdock-utils package #6

Workflow file for this run

name: "[rdock-utils] Lint and Test"
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build-dev:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build rdock-utils dev image
uses: docker/build-push-action@v4
with:
context: ./rdock-utils
tags: ghcr.io/rdock-utils:dev
file: ./rdock-utils/Dockerfile
target: development
cache-from: type=gha
cache-to: type=gha,mode=max
load: true
test:
needs: build-dev
runs-on: ubuntu-latest
container: ghcr.io/rdock-utils:dev
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run flake8
working-directory: ./rdock-utils
run: flake8 rdock-utils
- name: Run black
working-directory: ./rdock-utils
run: black --check rdock-utils
- name: Run isort
working-directory: ./rdock-utils
run: isort --check rdock-utils
- name: Run mypy
working-directory: ./rdock-utils
run: mypy rdock-utils
- name: Run pytest
working-directory: ./rdock-utils
run: pytest -v .