Added CLI test project and tests for 'm4g init' command
This commit is contained in:
30
Dockerfile
Normal file
30
Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim
|
||||
|
||||
# Copy the files to the /tool directory.
|
||||
WORKDIR /tool
|
||||
COPY . .
|
||||
# Manually add a reference to MycroForge.Core in the MycroForge.PluginTemplate project,
|
||||
# otherwise it will try to fetch it from a nuget repository.
|
||||
RUN dotnet add MycroForge.PluginTemplate reference MycroForge.Core
|
||||
|
||||
# Install the tools required for testing
|
||||
RUN apt update -y && \
|
||||
apt upgrade -y && \
|
||||
apt install -y git && \
|
||||
apt install -y bash && \
|
||||
apt install -y python3 && \
|
||||
apt install -y python3-pip && \
|
||||
apt install -y python3-venv
|
||||
|
||||
# Publish the CLI as a global tool and add the .dotnet/tools folder the the PATH variable.
|
||||
WORKDIR /tool/MycroForge.CLI
|
||||
RUN ./scripts/publish-tool.sh
|
||||
ENV PATH="$PATH:/root/.dotnet/tools"
|
||||
|
||||
WORKDIR /test
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
ENV PATH="$PATH:/root/.dotnet/tools"
|
||||
|
||||
CMD ["sleep", "infinity"]
|
||||
Reference in New Issue
Block a user