mirror of
https://github.com/internetee/epp_proxy.git
synced 2025-08-14 19:43:48 +02:00
Updated workflows
This commit is contained in:
parent
1f40bbf3fb
commit
548bf71ef8
5 changed files with 80 additions and 13 deletions
4
.github/workflows/build_base_image.yml
vendored
4
.github/workflows/build_base_image.yml
vendored
|
@ -9,11 +9,11 @@ jobs:
|
|||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Get versions
|
||||
shell: python
|
||||
|
|
12
.github/workflows/run-automatest-tests.yml
vendored
12
.github/workflows/run-automatest-tests.yml
vendored
|
@ -4,9 +4,9 @@ on: [push]
|
|||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2.0.0
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Build image for tests
|
||||
run: docker build -t proxy-tester -f Dockerfile.test .
|
||||
|
@ -15,7 +15,7 @@ jobs:
|
|||
run: docker run -d --name tester proxy-tester
|
||||
|
||||
- name: Install rebar dependencies
|
||||
run: docker exec -i tester rebar3 as test get-deps
|
||||
run: docker exec -i tester bash -l -c "source /root/.asdf/asdf.sh && rebar3 as test get-deps"
|
||||
|
||||
- name: Integrated Ruby app setup
|
||||
run: docker exec -d tester bash -l -c "cd apps/epp_proxy/priv/test_backend_app && bundle install && bundle exec rackup"
|
||||
|
@ -23,11 +23,11 @@ jobs:
|
|||
- name: Compile for tests
|
||||
run: |
|
||||
sleep 15
|
||||
docker exec -i tester rebar3 as test compile
|
||||
docker exec -i tester bash -l -c "source /root/.asdf/asdf.sh && rebar3 as test compile"
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
docker exec -i -e DEBUG=1 tester rebar3 ct --sys_config config/test.config --readable=false --cover --verbose=true
|
||||
docker exec -i -e DEBUG=1 tester bash -l -c "source /root/.asdf/asdf.sh && rebar3 ct --sys_config config/test.config --readable=false --cover --verbose=true"
|
||||
|
||||
- name: Show test coverage
|
||||
run: docker exec -i tester rebar3 cover --verbose
|
||||
run: docker exec -i tester bash -l -c "source /root/.asdf/asdf.sh && rebar3 cover --verbose"
|
|
@ -1,4 +1,4 @@
|
|||
FROM debian:buster-slim
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
wget \
|
71
Dockerfile.test
Normal file
71
Dockerfile.test
Normal file
|
@ -0,0 +1,71 @@
|
|||
FROM debian:bullseye-slim
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
# Install all dependencies in a single layer to reduce image size
|
||||
RUN apt-get update && apt-get install -y -qq \
|
||||
wget \
|
||||
git \
|
||||
build-essential \
|
||||
libncurses5-dev \
|
||||
automake \
|
||||
autoconf \
|
||||
curl \
|
||||
ca-certificates \
|
||||
libssl-dev \
|
||||
libreadline-dev \
|
||||
libdpkg-perl \
|
||||
liberror-perl \
|
||||
libc6 \
|
||||
libc-dev \
|
||||
perl \
|
||||
procps \
|
||||
inotify-tools \
|
||||
libssl1.1 \
|
||||
perl-base \
|
||||
zlib1g-dev \
|
||||
# Additional dependencies for Erlang build
|
||||
libncurses-dev \
|
||||
libsctp-dev \
|
||||
# Documentation tools to prevent build failures
|
||||
xsltproc \
|
||||
libxml2-utils \
|
||||
# Dependencies for Ruby
|
||||
libffi-dev \
|
||||
libyaml-dev \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set environment variables for Erlang build
|
||||
ENV KERL_CONFIGURE_OPTIONS="--disable-debug --without-javac --without-wx --without-odbc --disable-hipe --without-jinterface --without-docs"
|
||||
ENV KERL_BUILD_DOCS="no"
|
||||
ENV KERL_DOC_TARGETS=""
|
||||
ENV KERL_INSTALL_HTMLDOCS="no"
|
||||
ENV KERL_INSTALL_MANPAGES="no"
|
||||
|
||||
# Install asdf version manager
|
||||
RUN git clone https://github.com/asdf-vm/asdf.git --branch v0.6.3 "$HOME"/.asdf && \
|
||||
echo '. $HOME/.asdf/asdf.sh' >> "$HOME"/.bashrc && \
|
||||
echo '. $HOME/.asdf/asdf.sh' >> "$HOME"/.profile
|
||||
|
||||
ENV PATH="${PATH}:/root/.asdf/shims:/root/.asdf/bin"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy tool versions and install required plugins
|
||||
COPY .tool-versions ./
|
||||
RUN . $HOME/.asdf/asdf.sh && \
|
||||
asdf plugin-add erlang && \
|
||||
asdf plugin-add ruby && \
|
||||
asdf plugin-add rebar && \
|
||||
asdf install
|
||||
|
||||
# Copy the application code
|
||||
COPY . .
|
||||
|
||||
# Make sure asdf is loaded in non-interactive shells
|
||||
RUN echo '. $HOME/.asdf/asdf.sh' > /etc/profile.d/asdf.sh && \
|
||||
chmod +x /etc/profile.d/asdf.sh
|
||||
|
||||
# Keep container running for tests
|
||||
CMD ["tail", "-f", "/dev/null"]
|
|
@ -1,4 +0,0 @@
|
|||
FROM internetee/erlang-ruby:21.3.8-2.6.3
|
||||
COPY . .
|
||||
|
||||
CMD ["tail", "-f" , "/dev/null"]
|
Loading…
Add table
Add a link
Reference in a new issue