add tests in a GitHub Action

run-support
Gareth Rushgrove 4 years ago
parent eddbe0dd8c
commit 060be7804c
  1. 8
      .dockerignore
  2. 10
      .github/main.workflow
  3. 15
      Dockerfile

@ -0,0 +1,8 @@
.git/
dist
.egg/
*.egg-info
**/*.pyc
**/*.swp
**/__pycache__

@ -0,0 +1,10 @@
workflow "Quality" {
on = "push"
resolves = ["test"]
}
action "test" {
uses = "actions/docker/cli@master"
args = "build --target test ."
}

@ -0,0 +1,15 @@
FROM python:3 AS poetry
ENV PATH="/root/.poetry/bin:${PATH}"
RUN curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
FROM poetry AS base
RUN mkdir /app
WORKDIR /app
COPY pyproject.* .
RUN poetry install -n
COPY . /app
FROM base AS Test
RUN poetry run pytest
Loading…
Cancel
Save