Skip to content

Commit

Permalink
Add a test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorg88 committed Jul 17, 2024
1 parent e53ebd2 commit eae31e7
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 12 deletions.
10 changes: 0 additions & 10 deletions Dockerfile → .github/run-mpyl/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
# syntax=docker/dockerfile:1

# Comments are provided throughout this file to help you get started.
# If you need more help, visit the Dockerfile reference guide at
# https://docs.docker.com/go/dockerfile-reference/

# Want to help us make this template better? Share your feedback here: https://forms.gle/ybq9Krt8jtBL3iCk7


ARG PYTHON_VERSION=3.9
FROM python:${PYTHON_VERSION}-slim AS base

# Prevents Python from writing pyc files.
ENV PYTHONDONTWRITEBYTECODE=1

# Keeps Python from buffering stdout and stderr to avoid situations where
# the application crashes without emitting any logs due to buffering.
ENV PYTHONUNBUFFERED=1
Expand Down
6 changes: 4 additions & 2 deletions .github/run-mpyl/action.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: mpyl
description: Action to run mpyl from a docker container

inputs:
mpyl-command:
description: The mpyl command to run
required: false # set to true later
default: build status

runs:
using: 'docker'
image: 'Dockerfile'
using: docker
image: Dockerfile
args:
- ${{ inputs.mpyl-command }}
26 changes: 26 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: test
on:
workflow_dispatch:
push:


jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
install: true

- name: Run mpyl
uses: ./.github/run-mpyl
env:
DOCKER_BUILDKIT: 1
with:
mpyl-command: build status

0 comments on commit eae31e7

Please sign in to comment.